OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // Dart test program to test arithmetic operations. | 4 // Dart test program to test arithmetic operations. |
5 | 5 |
6 #library('arithmetic_test'); | 6 library arithmetic_test; |
7 #import('dart:math'); | 7 import 'dart:math'; |
8 | 8 |
9 class ArithmeticTest { | 9 class ArithmeticTest { |
10 | 10 |
11 static bool exceptionCaughtParseInt(String s) { | 11 static bool exceptionCaughtParseInt(String s) { |
12 try { | 12 try { |
13 parseInt(s); | 13 parseInt(s); |
14 return false; | 14 return false; |
15 } on FormatException catch (e) { | 15 } on FormatException catch (e) { |
16 return true; | 16 return true; |
17 } | 17 } |
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 for (int i = 0; i < 1500; i++) { | 429 for (int i = 0; i < 1500; i++) { |
430 runOne(); | 430 runOne(); |
431 testSmiDivDeopt(); | 431 testSmiDivDeopt(); |
432 } | 432 } |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
436 main() { | 436 main() { |
437 ArithmeticTest.testMain(); | 437 ArithmeticTest.testMain(); |
438 } | 438 } |
OLD | NEW |