Skip to content

Commit

Permalink
don't coerce after all
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Dec 5, 2024
1 parent a7031f8 commit db98320
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sample_parser/src/json_schema_testsuite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ impl JsonTestSequence {
)?;
let constraint = Constraint::new(parser);

let obj_str = serde_json::to_string_pretty(&round_float_to_int(&self.data)).unwrap();
let coerce_float_to_int = false;
let obj_str = if coerce_float_to_int {
serde_json::to_string_pretty(&round_float_to_int(&self.data)).unwrap()
} else {
serde_json::to_string_pretty(&self.data).unwrap()
};

match self.run_for(stats, &obj_str, tok_env, constraint) {
Ok(_) => Ok(()),
Err(e) => {
Expand Down

0 comments on commit db98320

Please sign in to comment.