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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 months 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
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 // Test that parameters keep their names in the output. 4 // Test that parameters keep their names in the output.
5 5
6 import "package:expect/expect.dart";
7 import 'compiler_helper.dart'; 6 import 'compiler_helper.dart';
8 7
9 const String FOO = r""" 8 const String FOO = r"""
10 void foo(var a, var b) { 9 void foo(var a, var b) {
11 } 10 }
12 """; 11 """;
13 12
14 const String BAR = r""" 13 const String BAR = r"""
15 void bar(var eval, var $eval) { 14 void bar(var eval, var $eval) {
16 } 15 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1); 85 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1);
87 86
88 generated = compile(NO_LOCAL, entry: 'foo'); 87 generated = compile(NO_LOCAL, entry: 'foo');
89 Expect.isFalse(generated.contains('var')); 88 Expect.isFalse(generated.contains('var'));
90 89
91 generated = compile(PARAMETER_INIT, entry: 'foo'); 90 generated = compile(PARAMETER_INIT, entry: 'foo');
92 Expect.isTrue(generated.contains('var result = test === true ? 42 : start')); 91 Expect.isTrue(generated.contains('var result = test === true ? 42 : start'));
93 // Check that there is only one var declaration. 92 // Check that there is only one var declaration.
94 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1); 93 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1);
95 } 94 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/redundant_phi_eliminator_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698