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

Side by Side Diff: tests/compiler/dart2js/interceptor_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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "package:expect/expect.dart";
6 import 'compiler_helper.dart'; 5 import 'compiler_helper.dart';
7 6
8 const String TEST_ONE = r""" 7 const String TEST_ONE = r"""
9 foo(a) { 8 foo(a) {
10 // Make sure there is a bailout version. 9 // Make sure there is a bailout version.
11 foo(a); 10 foo(a);
12 // This will make a one shot interceptor that will be optimized in 11 // This will make a one shot interceptor that will be optimized in
13 // the non-bailout version because we know a is a number. 12 // the non-bailout version because we know a is a number.
14 return (a + 42).toString; 13 return (a + 42).toString;
15 } 14 }
(...skipping 30 matching lines...) Expand all
46 Expect.isTrue(generated.contains('myVariableName')); 45 Expect.isTrue(generated.contains('myVariableName'));
47 46
48 // Check that an intercepted getter that does not need to be 47 // Check that an intercepted getter that does not need to be
49 // intercepted, is turned into a regular getter call or field 48 // intercepted, is turned into a regular getter call or field
50 // access. 49 // access.
51 generated = compile(TEST_THREE, entry: 'foo'); 50 generated = compile(TEST_THREE, entry: 'foo');
52 Expect.isFalse(generated.contains(r'a.get$length()')); 51 Expect.isFalse(generated.contains(r'a.get$length()'));
53 Expect.isTrue(generated.contains(r'$.A$().length')); 52 Expect.isTrue(generated.contains(r'$.A$().length'));
54 Expect.isTrue(generated.contains(r'$.get$length$a(a)')); 53 Expect.isTrue(generated.contains(r'$.get$length$a(a)'));
55 } 54 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/identity_test.dart ('k') | tests/compiler/dart2js/is_inference2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698