Merge pull request #3009 from elliottslaughter/utf8-idents-test-fix

Fix test floating point comparison to tolerate imprecise FPUs.
This commit is contained in:
Graydon Hoare 2012-07-25 10:20:40 -07:00
commit 1e241b5abd

View File

@ -1,7 +1,8 @@
fn main() {
let ε = 0.00001;
let Π = 3.14;
let = Π * Π + 1.54;
assert - 1.54 == Π * Π;
assert float::abs(( - 1.54) - (Π * Π)) < ε;
assert _გემრიელი_სადილი() == 0;
}