Skip to content

Commit dad4934

Browse files
committed
Fix tests
1 parent b1280b5 commit dad4934

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

tests/unit/engine.rs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,23 @@ mod tests {
221221
#[cfg(feature = "debug-info")]
222222
{
223223
let debug_info = engine.get_debug_info();
224-
let expected_size = 8_963_552_f32;
225-
assert!(debug_info.flatbuffer_size >= (expected_size * 0.99) as usize);
226-
assert!(debug_info.flatbuffer_size <= (expected_size * 1.01) as usize);
224+
let low_bound = 9_500_000;
225+
let high_bound = 10_000_000;
226+
assert!(
227+
debug_info.flatbuffer_size >= low_bound,
228+
"Expected size >= {} bytes, got {}",
229+
low_bound,
230+
debug_info.flatbuffer_size
231+
);
232+
assert!(
233+
debug_info.flatbuffer_size <= high_bound,
234+
"Expected size <= {} bytes, got {}",
235+
high_bound,
236+
debug_info.flatbuffer_size
237+
);
227238
}
228-
229239
let expected_hash: u64 = if cfg!(feature = "css-validation") {
230-
15959922653220214643
240+
1870862363610703254
231241
} else {
232242
17169786507112655088
233243
};

0 commit comments

Comments
 (0)