Skip to content

Commit 1e241b5

Browse files
committed
Merge pull request #3009 from elliottslaughter/utf8-idents-test-fix
Fix test floating point comparison to tolerate imprecise FPUs.
2 parents 4b8d053 + 1e27d19 commit 1e241b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/run-pass/utf8_idents.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
fn main() {
2+
let ε = 0.00001;
23
let Π = 3.14;
34
let लंच = Π * Π + 1.54;
4-
assert लंच - 1.54 == Π * Π;
5+
assert float::abs((लंच - 1.54) - (Π * Π)) < ε;
56
assert საჭმელად_გემრიელი_სადილი() == 0;
67
}
78

0 commit comments

Comments
 (0)