From 9e4fd8fdbafc25b326d1b7df43825891db51bd0b Mon Sep 17 00:00:00 2001 From: Tilen Majerle Date: Sun, 28 Mar 2021 23:16:51 +0200 Subject: [PATCH] Add comment into test string if comments are enabled --- dev/VisualStudio/lwjson_opts.h | 2 ++ test/test.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/dev/VisualStudio/lwjson_opts.h b/dev/VisualStudio/lwjson_opts.h index 9b89055..199adaf 100644 --- a/dev/VisualStudio/lwjson_opts.h +++ b/dev/VisualStudio/lwjson_opts.h @@ -40,5 +40,7 @@ * Open "include/lwjson/lwjson_opt.h" and * copy & replace here settings you want to change values */ +#define LWJSON_CFG_JSON5 1 +#define LWJSON_CFG_COMMENTS 1 #endif /* LWJSON_HDR_OPTS_H */ diff --git a/test/test.c b/test/test.c index e905517..f290587 100644 --- a/test/test.c +++ b/test/test.c @@ -149,6 +149,9 @@ test_json_data_types(void) { " \"num2\": -1234," " \"num3\": 0" " }," +#if LWJSON_CFG_COMMENTS + " /* This is my comment... */" +#endif /* LWJSON_CFG_COMMENTS */ " \"real\": {" " \"num1\":123.4," " \"num2\":-123.4,"