Lines Matching refs:shouldBeEqualToString
29 shouldBeEqualToString("(0.999).toPrecision(1)", "1");
30 shouldBeEqualToString("(0.999).toPrecision(2)", "1.0");
31 shouldBeEqualToString("(0.999).toPrecision(3)", "0.999");
37 shouldBeEqualToString("(0.0).toPrecision(4)", "0.000");
38 shouldBeEqualToString("(-0.0).toPrecision(4)", "0.000");
39 shouldBeEqualToString("(0.0).toPrecision()", "0");
40 shouldBeEqualToString("(-0.0).toPrecision()", "0");
41 shouldBeEqualToString("(1234.567).toPrecision()", "1234.567");
47 shouldBeEqualToString("(1234.567).toPrecision(1)", "1e+3");
48 shouldBeEqualToString("(1234.567).toPrecision(true)", "1e+3"); // just like 1
49 shouldBeEqualToString("(1234.567).toPrecision('1')", "1e+3"); // just like 1
50 shouldBeEqualToString("(1234.567).toPrecision(2)", "1.2e+3");
51 shouldBeEqualToString("(1234.567).toPrecision(2.9)", "1.2e+3");
52 shouldBeEqualToString("(1234.567).toPrecision(5)", "1234.6");
53 shouldBeEqualToString("(1234.567).toPrecision(21)", "1234.56700000000000728");
63 shouldBeEqualToString("posInf.toPrecision()", "Infinity");
64 shouldBeEqualToString("negInf.toPrecision()", "-Infinity");
65 shouldBeEqualToString("nan.toPrecision()", "NaN");