| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 import "package:expect/expect.dart"; | |
| 6 | |
| 7 const x = 19; | |
| 8 const y = 3; | |
| 9 const z = -5; | |
| 10 const g1 = x + y; | |
| 11 const g2 = x * y; | |
| 12 const g3 = x / y; | |
| 13 const g4 = x ~/ y; | |
| 14 const g5 = x << y; | |
| 15 const g6 = x >> y; | |
| 16 const g7 = ~z; | |
| 17 const g8 = -x; | |
| 18 const g9 = x < y; | |
| 19 const g10 = x <= y; | |
| 20 const g11 = x <= x; | |
| 21 const g12 = x > y; | |
| 22 const g13 = x >= y; | |
| 23 const g14 = x >= x; | |
| 24 const g15 = x == y; | |
| 25 const g16 = x == x; | |
| 26 const g17 = x != y; | |
| 27 const g18 = x != x; | |
| 28 const g19 = x | y; | |
| 29 const g20 = x & y; | |
| 30 const g21 = x ^ y; | |
| 31 const g22 = g1 + g2 + g4 + g5 + g6 + g7 + g8; | |
| 32 const g23 = x % y; | |
| 33 | |
| 34 main() { | |
| 35 Expect.equals(22, g1); | |
| 36 Expect.equals(57, g2); | |
| 37 Expect.equals(6.333333333333333333333333333, g3); | |
| 38 Expect.equals(6, g4); | |
| 39 Expect.equals(152, g5); | |
| 40 Expect.equals(2, g6); | |
| 41 Expect.equals(4, g7); | |
| 42 Expect.equals(-19, g8); | |
| 43 Expect.equals(false, g9); | |
| 44 Expect.equals(false, g10); | |
| 45 Expect.equals(true, g11); | |
| 46 Expect.equals(true, g12); | |
| 47 Expect.equals(true, g13); | |
| 48 Expect.equals(true, g14); | |
| 49 Expect.equals(false, g15); | |
| 50 Expect.equals(true, g16); | |
| 51 Expect.equals(true, g17); | |
| 52 Expect.equals(false, g18); | |
| 53 Expect.equals(19, g19); | |
| 54 Expect.equals(3, g20); | |
| 55 Expect.equals(16, g21); | |
| 56 Expect.equals(224, g22); | |
| 57 Expect.equals(1, g23); | |
| 58 } | |
| OLD | NEW |