Remove validation bits
Discard invalid properties from json decode. JSON output should only
contain valid properties. This saves time in preventing post
processing of output for valid fields.
Ensure round trip validity with validation bits removed and required
properties populated.
Fix bugs in json decode.
Overhaul unit tests to use valijson. Add tests with static examples
to validate against schema. Use and nlohmann for better schema
validation over intrinsic libcper validation.
Example json output before:
{
"ValidationBits": {
"LevelValid": false,
"CorrectedValid": true
},
"Level": 1,
"Corrected": true
}
After:
{
"Corrected": true
}
Change-Id: I188bdc2827a57d938c22a431238fadfcdc939ab8
Signed-off-by: Aushim Nagarkatti <anagarkatti@nvidia.com>
diff --git a/generator/gen-utils.c b/generator/gen-utils.c
index 03f6b8d..46642b2 100644
--- a/generator/gen-utils.c
+++ b/generator/gen-utils.c
@@ -44,5 +44,5 @@
//Initializes the random seed for rand() using the current time.
void init_random()
{
- srand((unsigned int)time(NULL));
+ srand(1);
}