Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
752c62b4
Unverified
Commit
752c62b4
authored
May 02, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🔨
remove double tests
parent
bec55493
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
Makefile
Makefile
+3
-3
test/CMakeLists.txt
test/CMakeLists.txt
+15
-16
No files found.
Makefile
View file @
752c62b4
...
...
@@ -79,7 +79,7 @@ coverage:
mkdir
build_coverage
cd
build_coverage
;
CXX
=
g++-8 cmake ..
-GNinja
-DJSON_Coverage
=
ON
-DJSON_MultipleHeaders
=
ON
cd
build_coverage
;
ninja
cd
build_coverage
;
ctest
-
E
'.*_default'
-
j10
cd
build_coverage
;
ctest
-j10
cd
build_coverage
;
ninja lcov_html
open build_coverage/test/html/index.html
...
...
@@ -88,7 +88,7 @@ coverage-fast:
mkdir
build_coverage
cd
build_coverage
;
CXX
=
g++-9 cmake ..
-GNinja
-DJSON_Coverage
=
ON
-DJSON_MultipleHeaders
=
ON
cd
build_coverage
;
ninja
cd
build_coverage
;
ctest
-
E
'.*_default'
-
j10
cd
build_coverage
;
ctest
-j10
cd
build_coverage
;
ninja fastcov_html
open build_coverage/test/html/index.html
...
...
@@ -485,7 +485,7 @@ clang_sanitize:
mkdir
clang_sanitize_build
cd
clang_sanitize_build
;
CXX
=
$(COMPILER_DIR)
/clang++ cmake ..
-DJSON_Sanitizer
=
On
-DJSON_MultipleHeaders
=
ON
-GNinja
cd
clang_sanitize_build
;
ninja
cd
clang_sanitize_build
;
ctest
-
E
'.*_default'
-
j10
cd
clang_sanitize_build
;
ctest
-j10
##########################################################################
...
...
test/CMakeLists.txt
View file @
752c62b4
...
...
@@ -155,32 +155,20 @@ foreach(file ${files})
string
(
REGEX REPLACE
"unit-([^$]+)"
"test-
\\
1"
testcase
${
file_basename
}
)
add_executable
(
${
testcase
}
$<TARGET_OBJECTS:doctest_main>
${
file
}
)
target_compile_definitions
(
${
testcase
}
PRIVATE
DOCTEST_CONFIG_SUPER_FAST_ASSERTS
)
target_compile_definitions
(
${
testcase
}
PRIVATE DOCTEST_CONFIG_SUPER_FAST_ASSERTS
)
target_compile_options
(
${
testcase
}
PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
)
target_include_directories
(
${
testcase
}
PRIVATE
${
CMAKE_BINARY_DIR
}
/include
thirdparty/doctest
thirdparty/fifo_map
)
target_include_directories
(
${
testcase
}
PRIVATE
${
CMAKE_BINARY_DIR
}
/include thirdparty/doctest thirdparty/fifo_map
)
target_link_libraries
(
${
testcase
}
${
NLOHMANN_JSON_TARGET_NAME
}
)
add_test
(
NAME
"
${
testcase
}
_default"
COMMAND
${
testcase
}
${
DOCTEST_TEST_FILTER
}
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
)
set_tests_properties
(
"
${
testcase
}
_default"
PROPERTIES LABELS
"default"
FIXTURES_REQUIRED TEST_DATA
)
add_test
(
NAME
"
${
testcase
}
_all"
add_test
(
NAME
"
${
testcase
}
"
COMMAND
${
testcase
}
${
DOCTEST_TEST_FILTER
}
--no-skip
WORKING_DIRECTORY
${
CMAKE_SOURCE_DIR
}
)
set_tests_properties
(
"
${
testcase
}
_all
"
PROPERTIES LABELS
"all"
FIXTURES_REQUIRED TEST_DATA
)
set_tests_properties
(
"
${
testcase
}
"
PROPERTIES LABELS
"all"
FIXTURES_REQUIRED TEST_DATA
)
if
(
JSON_Valgrind
)
add_test
(
NAME
"
${
testcase
}
_valgrind"
...
...
@@ -191,6 +179,17 @@ foreach(file ${files})
endif
()
endforeach
()
add_executable
(
json_unit EXCLUDE_FROM_ALL $<TARGET_OBJECTS:doctest_main>
${
files
}
)
target_compile_definitions
(
json_unit PRIVATE DOCTEST_CONFIG_SUPER_FAST_ASSERTS
)
target_compile_options
(
json_unit PRIVATE
$<$<CXX_COMPILER_ID:MSVC>:/EHsc;$<$<CONFIG:Release>:/Od>>
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-Wno-deprecated;-Wno-float-equal>
$<$<CXX_COMPILER_ID:GNU>:-Wno-deprecated-declarations>
)
target_include_directories
(
json_unit PRIVATE
${
CMAKE_BINARY_DIR
}
/include thirdparty/doctest thirdparty/fifo_map
)
target_link_libraries
(
json_unit
${
NLOHMANN_JSON_TARGET_NAME
}
)
add_dependencies
(
json_unit download_test_data
)
#############################################################################
# Test the generated build configs
#############################################################################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment