Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: tests/language/src/AssignOpTest.dart

Issue 8947008: When += (and similar operations) are converted to = + , (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « frog/minfrog ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 for testing assign operators. 4 // Dart test program for testing assign operators.
5 5
6 6
7 class AssignOpTest { 7 class AssignOpTest {
8 AssignOpTest() {} 8 AssignOpTest() {}
9 9
10 static testMain() { 10 static testMain() {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 x >>= 3; 59 x >>= 3;
60 Expect.equals(0x1F, x); 60 Expect.equals(0x1F, x);
61 x <<= 3; 61 x <<= 3;
62 Expect.equals(0xF8, x); 62 Expect.equals(0xF8, x);
63 x |= 0xF00; 63 x |= 0xF00;
64 Expect.equals(0xFF8, x); 64 Expect.equals(0xFF8, x);
65 x &=0xF0; 65 x &=0xF0;
66 Expect.equals(0xF0, x); 66 Expect.equals(0xF0, x);
67 x ^=0x11; 67 x ^=0x11;
68 Expect.equals(0xE1, x); 68 Expect.equals(0xE1, x);
69
70 var y = 100;
71 y += 1 << 3;
72 Expect.equals(108, y);
73 y *= 2 + 1;
74 Expect.equals(324, y);
75 y -= 3 - 2;
76 Expect.equals(323, y);
77 y += 3 * 4;
78 Expect.equals(335, y);
69 } 79 }
70 80
71 static var f; 81 static var f;
72 var instf; 82 var instf;
73 } 83 }
74 main() { 84 main() {
75 AssignOpTest.testMain(); 85 AssignOpTest.testMain();
76 } 86 }
OLDNEW
« no previous file with comments | « frog/minfrog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698