Hi,
I am modify your library to support schema validation with Qt Json backend instead of nlohmann. however that is not the problem.
I develop under windows MSVC2022 and got assert errors when running the tests.
when running jsonata_generated_tests with the nlohmann backend (not the Qt one ) I get test errors :
one I fixed by updating the tokenizer.cpp:379 regex_match (using &*byteEnd is not allowed under msvc)
I also have a test failure with $formatinteger(1e46,'w') which causes integer conversion issues and then std::vector index problems (the converted value is negative).
I also have a test failure :
DEBUG: Using inline data from test definition
--Expr=( $data := { 'number': [1..2e5].$string() }; $values := $data.number; $count($values) ) Expected=200000 ErrorCode=null
--Data=null
--Exception = U1001 --> JSONataException U1001
--ExpectedError = null Expected=200000
WRONG RESULT (exception)
Error in runSubCase(jsonata/test/test-suite/groups/flattening/large.json, 0): Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_0
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(286): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 0) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_0".
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(286): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 0) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_0".
[ FAILED ] flatteningTest.large_case_0 (10040 ms)
[ RUN ] flatteningTest.large_case_1
DEBUG: Using inline data from test definition
--Expr=( $data := { 'number': [1..2e5].$string() }; $values := $lookup($data, 'number'); $count($values) ) Expected=200000 ErrorCode=null
--Data=null
--Exception = U1001 --> JSONataException U1001
--ExpectedError = null Expected=200000
WRONG RESULT (exception)
Error in runSubCase(jsonata/test/test-suite/groups/flattening/large.json, 1): Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_1
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(291): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 1) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_1".
[ FAILED ] flatteningTest.large_case_1 (10033 ms)
[ RUN ] flatteningTest.sequence_of_arrays_case_0
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(291): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 1) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_1".
can you tell me how to treat these test cases ?
Hi,
I am modify your library to support schema validation with Qt Json backend instead of nlohmann. however that is not the problem.
I develop under windows MSVC2022 and got assert errors when running the tests.
when running jsonata_generated_tests with the nlohmann backend (not the Qt one ) I get test errors :
one I fixed by updating the tokenizer.cpp:379 regex_match (using &*byteEnd is not allowed under msvc)
I also have a test failure with $formatinteger(1e46,'w') which causes integer conversion issues and then std::vector index problems (the converted value is negative).
I also have a test failure :
DEBUG: Using inline data from test definition
--Expr=( $data := { 'number': [1..2e5].$string() }; $values := $data.number; $count($values) ) Expected=200000 ErrorCode=null
--Data=null
--Exception = U1001 --> JSONataException U1001
--ExpectedError = null Expected=200000
WRONG RESULT (exception)
Error in runSubCase(jsonata/test/test-suite/groups/flattening/large.json, 0): Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_0
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(286): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 0) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_0".
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(286): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 0) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_0".
[ FAILED ] flatteningTest.large_case_0 (10040 ms)
[ RUN ] flatteningTest.large_case_1
DEBUG: Using inline data from test definition
--Expr=( $data := { 'number': [1..2e5].$string() }; $values := $lookup($data, 'number'); $count($values) ) Expected=200000 ErrorCode=null
--Data=null
--Exception = U1001 --> JSONataException U1001
--ExpectedError = null Expected=200000
WRONG RESULT (exception)
Error in runSubCase(jsonata/test/test-suite/groups/flattening/large.json, 1): Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_1
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(291): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 1) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_1".
[ FAILED ] flatteningTest.large_case_1 (10033 ms)
[ RUN ] flatteningTest.sequence_of_arrays_case_0
C:\Data\Projects\jsonata-cpp\test\gen\flatteningTest.cpp(291): error: Expected: runSubCase("jsonata/test/test-suite/groups/flattening/large.json", 1) doesn't throw an exception.
Actual: it throws std::runtime_error with description "Test subcase failed: jsonata/test/test-suite/groups/flattening/large.json_1".
can you tell me how to treat these test cases ?