Browse Source

Fix test_util_file for VS2013 too, but skip all the tests for anything older than that because the limitations are too inconvenient.

tags/json-c-0.14-20200419
Eric Haszlakiewicz 5 years ago
parent
commit
41f434e89f
2 changed files with 4 additions and 1 deletions
  1. +3
    -1
      CMakeLists.txt
  2. +1
    -0
      tests/test_util_file.c

+ 3
- 1
CMakeLists.txt View File

@@ -21,7 +21,9 @@ endif()


include(CTest) include(CTest)


if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND
(NOT MSVC OR NOT (MSVC_VERSION LESS 1800)) # Tests need at least VS2013
)
add_subdirectory(tests) add_subdirectory(tests)
endif() endif()




+ 1
- 0
tests/test_util_file.c View File

@@ -19,6 +19,7 @@


#include "json.h" #include "json.h"
#include "json_util.h" #include "json_util.h"
#include "snprintf_compat.h"


static void test_read_valid_with_fd(const char *testdir); static void test_read_valid_with_fd(const char *testdir);
static void test_read_valid_nested_with_fd(const char *testdir); static void test_read_valid_nested_with_fd(const char *testdir);


Loading…
Cancel
Save