Chromium Code Reviews| Index: tests/lib/math/math2_test.dart |
| diff --git a/tests/lib/math/math2_test.dart b/tests/lib/math/math2_test.dart |
| index cf71142d7ca27305129c0e9ecdfe7e96b5c1d470..21ff940ff3f28f85c0634f39fa85e3a597a1feed 100644 |
| --- a/tests/lib/math/math2_test.dart |
| +++ b/tests/lib/math/math2_test.dart |
| @@ -241,6 +241,12 @@ class MathLibraryTest { |
| Expect.equals(true, parseIntThrowsFormatException(" +0x100 ")); |
| } |
| + static void testRandom() { |
| + math.Random r = new math.Random(); |
| + checkClose(5, r.nextIntRange(1, 10), 10); |
|
floitsch
2013/11/18 13:36:03
checkClose is typed for doubles. This will throw i
|
| + checkClose(5, r.nextInt(10), 10); |
| + } |
| + |
| static testMain() { |
| testConstants(); |
| testSin(); |
| @@ -255,6 +261,7 @@ class MathLibraryTest { |
| testExp(); |
| testPow(); |
| testParseInt(); |
| + testRandom(); |
| } |
| } |