Fix gen_compare::record test

Unbound floating point numbers cannot be compared for Eq as of
obligation checking - this test is a correction to enforce that!
This commit is contained in:
Ayaz Hafiz 2022-12-01 11:12:50 -06:00
parent 590535a42b
commit e8492f279e
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -122,23 +122,23 @@ fn empty_record() {
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
fn record() {
assert_evals_to!(
"{ x: 123, y: \"Hello\", z: 3.14 } == { x: 123, y: \"Hello\", z: 3.14 }",
"{ x: 123, y: \"Hello\", z: 3 } == { x: 123, y: \"Hello\", z: 3 }",
true,
bool
);
assert_evals_to!(
"{ x: 234, y: \"Hello\", z: 3.14 } == { x: 123, y: \"Hello\", z: 3.14 }",
"{ x: 234, y: \"Hello\", z: 3 } == { x: 123, y: \"Hello\", z: 3 }",
false,
bool
);
assert_evals_to!(
"{ x: 123, y: \"World\", z: 3.14 } == { x: 123, y: \"Hello\", z: 3.14 }",
"{ x: 123, y: \"World\", z: 3 } == { x: 123, y: \"Hello\", z: 3 }",
false,
bool
);
assert_evals_to!(
"{ x: 123, y: \"Hello\", z: 1.11 } == { x: 123, y: \"Hello\", z: 3.14 }",
"{ x: 123, y: \"Hello\", z: 1 } == { x: 123, y: \"Hello\", z: 3 }",
false,
bool
);