Add unit test for json_read_number (continues thoth-tech PR#122) #225
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR continues on from #122, created by former contributor @ConnorClancyDeakin.
Original PR Description
The goal here was to implement additional testing so that the JSON_unit_test also checks that it can read different number types, other sections already test the INT reading so this just tests the double and float reading in order to make sure the number is correct and the type is correct
The test section is Json can be created and read with different number types, in the test case of json can be created and read.
Continuation
The original PR had 2 reviews. The last reviewer asked to include the relevant
usingdirective at top of file:using Catch::Matchers::WithinRel;This PR addresses the request, amends a formatting issue (the last test case was incorrectly nested) and adjusts the sequence of
free_jsoncalls accordingly.Type of change
How Has This Been Tested?
Built the test project as per unit testing instructions, running
skunit_testswith all tests passed. Test was also run with more specificity using./skunit_tests [json_as_number] -sTesting Checklist
Checklist