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

Side by Side Diff: tests/language/function_literals2_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 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
« no previous file with comments | « tests/language/function_getter_test.dart ('k') | tests/language/function_literals_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) 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 // 4 //
5 // Dart test for new function type alias. 5 // Dart test for new function type alias.
6 6
7 import "package:expect/expect.dart";
8
7 class FunctionLiteralsTest { 9 class FunctionLiteralsTest {
8 10
9 static void testMain() { 11 static void testMain() {
10 f(x) { return x * 2;} 12 f(x) { return x * 2;}
11 f(42); // make sure it is parsed as a function call 13 f(42); // make sure it is parsed as a function call
12 Expect.equals(20, f(10)); 14 Expect.equals(20, f(10));
13 15
14 int g(x) { return x * 2;} 16 int g(x) { return x * 2;}
15 g(42); // make sure it is parsed as a function call 17 g(42); // make sure it is parsed as a function call
16 Expect.equals(20, g(10)); 18 Expect.equals(20, g(10));
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 class B { 69 class B {
68 var f; 70 var f;
69 int n; 71 int n;
70 B(z) : f = ((x) => x * x) { n = z; } 72 B(z) : f = ((x) => x * x) { n = z; }
71 B.withZ(z) : f = ((x) { return x * x + 1; }) { n = z; } 73 B.withZ(z) : f = ((x) { return x * x + 1; }) { n = z; }
72 } 74 }
73 75
74 main() { 76 main() {
75 FunctionLiteralsTest.testMain(); 77 FunctionLiteralsTest.testMain();
76 } 78 }
OLDNEW
« no previous file with comments | « tests/language/function_getter_test.dart ('k') | tests/language/function_literals_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698