Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON Unit Tests #2

Merged
merged 1 commit into from
Aug 29, 2020
Merged

Add JSON Unit Tests #2

merged 1 commit into from
Aug 29, 2020

Conversation

yourslab
Copy link
Contributor

@yourslab yourslab commented Aug 29, 2020

This PR adds the following unit tests from PR #1139 of C SDK Development Branch

  • Add skeleton for json unit tests

  • Add json_utest to coverage target

  • Add basic happy path test

  • Add CMakeLists.txt for JSON library

  • Do not include null term char

  • Add some simple cases

  • Add literals and exponents and collection test cases

  • Add cases for trailing space

  • Complete coverage for shortestUTF8

  • Complete coverage for skipAnyScalar and its callee methods

  • Complete coverage for skipExponent

  • Complete coverage for skipArrayScalars

  • Complete coverage for skipObjectScalars

  • Complete coverage for nextKeyValuePair

  • Complete coverage for max depth cases

  • Make all single string scalars into complete JSON document with key and value when possible

  • Make JSON_Search look up the same cases as JSON_Validate

  • Ensure that all cases tried in JSON_Validate are also tried in JSON_Search

  • Change unreachable branches to asserts

  • Add lexicon.txt

  • Update lexicon.txt

  • Update include direcories to have only what's needed for json library and tests

  • Remove cmake_minimum_required for json/utest/CMakeLists.txt

  • Address PR comments

  • Update lexicon.txt

  • Use json library for CBMC PR

  • Add invalid params tests for json unit tests

  • Complete coverage for search

  • Add JSON_Search Bad and NULL parameter tests

  • Complete coverage for JSON library

  • Reflect JSON_Search invalid documents cases to reflect JSON_Validate

  • Update lexicon

  • Remove json library that is private to shadow demo

* Add skeleton for json unit tests

* Add json_utest to coverage target

* Add basic happy path test

* Add CMakeLists.txt for JSON library

* Do not include null term char

* Add some simple cases

* Add literals and exponents and collection test cases

* Add cases for trailing space

* Complete coverage for shortestUTF8

* Complete coverage for skipAnyScalar and its callee methods

* Complete coverage for skipExponent

* Complete coverage for skipArrayScalars

* Complete coverage for skipObjectScalars

* Complete coverage for nextKeyValuePair

* Complete coverage for max depth cases

* Make all single string scalars into complete JSON document with key and value when possible

* Make JSON_Search look up the same cases as JSON_Validate

* Ensure that all cases tried in JSON_Validate are also tried in JSON_Search

* Change unreachable branches to asserts

* Add lexicon.txt

* Update lexicon.txt

* Update include direcories to have only what's needed for json library and tests

* Remove cmake_minimum_required for json/utest/CMakeLists.txt

* Address PR comments

* Update lexicon.txt

* Use json library for CBMC PR

* Add invalid params tests for json unit tests

* Complete coverage for search

* Add JSON_Search Bad and NULL parameter tests

* Complete coverage for JSON library

* Reflect JSON_Search invalid documents cases to reflect JSON_Validate

* Update lexicon

* Remove json library that is private to shadow demo
@yourslab yourslab changed the title Add JSON Unit Tests (#1139) Add JSON Unit Tests Aug 29, 2020
@yourslab yourslab merged commit 3d44e11 into master Aug 29, 2020
@yourslab yourslab deleted the add-unit-tests branch September 9, 2020 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant