From db98320ed06448e93f0a717c190b060acbe4d237 Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Wed, 4 Dec 2024 17:33:12 -0800 Subject: [PATCH] don't coerce after all --- sample_parser/src/json_schema_testsuite.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sample_parser/src/json_schema_testsuite.rs b/sample_parser/src/json_schema_testsuite.rs index 4bc5921..47f0927 100644 --- a/sample_parser/src/json_schema_testsuite.rs +++ b/sample_parser/src/json_schema_testsuite.rs @@ -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) => {