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

Side by Side Diff: tests/compiler/dart2js/boolified_operator_test.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « tests/co19/test_config.dart ('k') | tests/compiler/dart2js/class_codegen2_test.dart » ('j') | 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) 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 4
5 library boolified_operator_test; 5 library boolified_operator_test;
6 import 'compiler_helper.dart'; 6 import 'compiler_helper.dart';
7 7
8 const String TEST_EQUAL = r""" 8 const String TEST_EQUAL = r"""
9 foo(param0, param1) { 9 foo(param0, param1) {
10 if (param0 == param1) return 0; 10 if (param0 == param1) return 0;
(...skipping 29 matching lines...) Expand all
40 """; 40 """;
41 41
42 const String TEST_GREATER_EQUAL = r""" 42 const String TEST_GREATER_EQUAL = r"""
43 foo(param0, param1) { 43 foo(param0, param1) {
44 if (param0 >= param1) return 0; 44 if (param0 >= param1) return 0;
45 return 1; 45 return 1;
46 } 46 }
47 """; 47 """;
48 48
49 main() { 49 main() {
50 RegExp regexp = new RegExp('=== true'); 50 RegExp regexp = const RegExp('=== true');
51 51
52 String generated = compile(TEST_EQUAL, entry: 'foo'); 52 String generated = compile(TEST_EQUAL, entry: 'foo');
53 Expect.isFalse(generated.contains('=== true')); 53 Expect.isFalse(generated.contains('=== true'));
54 Expect.isTrue(generated.contains('eqB')); 54 Expect.isTrue(generated.contains('eqB'));
55 55
56 generated = compile(TEST_EQUAL_NULL, entry: 'foo'); 56 generated = compile(TEST_EQUAL_NULL, entry: 'foo');
57 Expect.isFalse(generated.contains('=== true')); 57 Expect.isFalse(generated.contains('=== true'));
58 Expect.isTrue(generated.contains('== null')); 58 Expect.isTrue(generated.contains('== null'));
59 59
60 generated = compile(TEST_LESS, entry: 'foo'); 60 generated = compile(TEST_LESS, entry: 'foo');
61 Expect.isFalse(generated.contains('=== true')); 61 Expect.isFalse(generated.contains('=== true'));
62 Expect.isTrue(generated.contains('ltB')); 62 Expect.isTrue(generated.contains('ltB'));
63 63
64 generated = compile(TEST_LESS_EQUAL, entry: 'foo'); 64 generated = compile(TEST_LESS_EQUAL, entry: 'foo');
65 Expect.isFalse(generated.contains('=== true')); 65 Expect.isFalse(generated.contains('=== true'));
66 Expect.isTrue(generated.contains('leB')); 66 Expect.isTrue(generated.contains('leB'));
67 67
68 generated = compile(TEST_GREATER, entry: 'foo'); 68 generated = compile(TEST_GREATER, entry: 'foo');
69 Expect.isFalse(generated.contains('=== true')); 69 Expect.isFalse(generated.contains('=== true'));
70 Expect.isTrue(generated.contains('gtB')); 70 Expect.isTrue(generated.contains('gtB'));
71 71
72 generated = compile(TEST_GREATER_EQUAL, entry: 'foo'); 72 generated = compile(TEST_GREATER_EQUAL, entry: 'foo');
73 Expect.isFalse(generated.contains('=== true')); 73 Expect.isFalse(generated.contains('=== true'));
74 Expect.isTrue(generated.contains('geB')); 74 Expect.isTrue(generated.contains('geB'));
75 } 75 }
OLDNEW
« no previous file with comments | « tests/co19/test_config.dart ('k') | tests/compiler/dart2js/class_codegen2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698