-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Labels
kind: bugsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation
Milestone
Description
Description
ABI tests are failed when 'JSON_Diagnostic_Positions' cmake option is enabled.
./tests/abi/config/abi_config_default & ./tests/abi/config/abi_config_noversion are missing the Diagnostic Positions related expected namespace string in the test cases.
Reproduction steps
- Turn on the cmake option in CMakelists.txt; "option(JSON_Diagnostic_Positions "Enable diagnostic positions." ON)"
- mkdir build
- cd build
- cmake .. DBUILD_TESTING=ON
- cmake --build .
- run ./tests/abi/config/abi_config_default & ./tests/abi/config/abi_config_noversion
Step 6 fails
Expected vs. actual results
Expected results:
Both tests pass.
Actual results:
➜ build git:(issue4569-compilation-fix) ✗ ./tests/abi/config/abi_config_default
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
===============================================================================
/home/hnampall/json/tests/abi/config/default.cpp:15:
TEST CASE: default namespace
namespace matches expectation
/home/hnampall/json/tests/abi/config/default.cpp:38: ERROR: CHECK( namespace_name<nlohmann::json>(ns) == expected ) is NOT correct!
values: CHECK( nlohmann::json_abi_diag_dp_v3_11_3::basic_json == nlohmann::json_abi_diag_v3_11_3::basic_json )
===============================================================================
[doctest] test cases: 1 | 0 passed | 1 failed | 0 skipped
[doctest] assertions: 2 | 1 passed | 1 failed |
[doctest] Status: FAILURE!
➜ build git:(issue4569-compilation-fix) ✗ ./tests/abi/config/abi_config_noversion
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
===============================================================================
/home/hnampall/json/tests/abi/config/noversion.cpp:16:
TEST CASE: default namespace without version component
namespace matches expectation
/home/hnampall/json/tests/abi/config/noversion.cpp:37: ERROR: CHECK( namespace_name<nlohmann::json>(ns) == expected ) is NOT correct!
values: CHECK( nlohmann::json_abi_diag_dp::basic_json == nlohmann::json_abi_diag::basic_json )
===============================================================================
[doctest] test cases: 1 | 0 passed | 1 failed | 0 skipped
[doctest] assertions: 2 | 1 passed | 1 failed |
[doctest] Status: FAILURE!
Minimal code example
No response
Error messages
/home/hnampall/json/tests/abi/config/default.cpp:38: ERROR: CHECK( namespace_name<nlohmann::json>(ns) == expected ) is NOT correct!
values: CHECK( nlohmann::json_abi_diag_dp_v3_11_3::basic_json == nlohmann::json_abi_diag_v3_11_3::basic_json )
/home/hnampall/json/tests/abi/config/noversion.cpp:37: ERROR: CHECK( namespace_name<nlohmann::json>(ns) == expected ) is NOT correct!
values: CHECK( nlohmann::json_abi_diag_dp::basic_json == nlohmann::json_abi_diag::basic_json )
Compiler and operating system
gcc 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2) on Ubuntu 20.0.1 - focal
Library version
develop branch
Validation
- The bug also occurs if the latest version from the
develop
branch is used. - I can successfully compile and run the unit tests.
Metadata
Metadata
Assignees
Labels
kind: bugsolution: proposed fixa fix for the issue has been proposed and waits for confirmationa fix for the issue has been proposed and waits for confirmation