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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated latest tests. 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";
6 import 'compiler_helper.dart'; 7 import 'compiler_helper.dart';
7 8
8 const String FOO = r""" 9 const String FOO = r"""
9 void foo(var a, var b) { 10 void foo(var a, var b) {
10 } 11 }
11 """; 12 """;
12 13
13 const String BAR = r""" 14 const String BAR = r"""
14 void bar(var eval, var $eval) { 15 void bar(var eval, var $eval) {
15 } 16 }
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1); 86 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1);
86 87
87 generated = compile(NO_LOCAL, entry: 'foo'); 88 generated = compile(NO_LOCAL, entry: 'foo');
88 Expect.isFalse(generated.contains('var')); 89 Expect.isFalse(generated.contains('var'));
89 90
90 generated = compile(PARAMETER_INIT, entry: 'foo'); 91 generated = compile(PARAMETER_INIT, entry: 'foo');
91 Expect.isTrue(generated.contains('var result = test === true ? 42 : start')); 92 Expect.isTrue(generated.contains('var result = test === true ? 42 : start'));
92 // Check that there is only one var declaration. 93 // Check that there is only one var declaration.
93 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1); 94 checkNumberOfMatches(new RegExp("var").allMatches(generated).iterator, 1);
94 } 95 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698