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

Side by Side Diff: frog/tests/leg/src/mock_compiler.dart

Issue 9193016: Add the arity to calls, and support noSuchMethodException. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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 4
5 #library('mock_compiler'); 5 #library('mock_compiler');
6 6
7 #import("../../../leg/leg.dart"); 7 #import("../../../leg/leg.dart");
8 #import("../../../leg/elements/elements.dart"); 8 #import("../../../leg/elements/elements.dart");
9 #import("../../../leg/tree/tree.dart"); 9 #import("../../../leg/tree/tree.dart");
10 #import("../../../leg/util/util.dart"); 10 #import("../../../leg/util/util.dart");
11 #import("parser_helper.dart"); 11 #import("parser_helper.dart");
12 12
13 class WarningMessage { 13 class WarningMessage {
14 Node node; 14 Node node;
15 Message message; 15 Message message;
16 WarningMessage(this.node, this.message); 16 WarningMessage(this.node, this.message);
17 17
18 toString() => message.toString(); 18 toString() => message.toString();
19 } 19 }
20 20
21 final String DEFAULT_CORELIB = @''' 21 final String DEFAULT_CORELIB = @'''
22 lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {} 22 lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {}
23 neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {} 23 neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {}
24 or() {} and() {} not() {} print(var obj) {} eqNull() {} eqq() {} 24 or() {} and() {} not() {} print(var obj) {} eqNull(a) {} eqq() {}
25 guard$array(x) { return x; } 25 guard$array(x) { return x; }
26 guard$num(x) { return x; } 26 guard$num(x) { return x; }
27 guard$string(x) { return x; } 27 guard$string(x) { return x; }
28 guard$stringOrArray(x) { return x; } 28 guard$stringOrArray(x) { return x; }
29 builtin$add$1(receiver, value) {} 29 builtin$add$1(receiver, value) {}
30 builtin$get$length(var receiver) {} 30 builtin$get$length(var receiver) {}
31 builtin$filter$1(receiver, predicate) {} 31 builtin$filter$1(receiver, predicate) {}
32 builtin$removeLast$0(receiver) {} 32 builtin$removeLast$0(receiver) {}
33 index(a, index) {} 33 index(a, index) {}
34 indexSet(a, index, value) {} 34 indexSet(a, index, value) {}
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } while (expected.hasNext()); 129 } while (expected.hasNext());
130 fail('Too few warnings'); 130 fail('Too few warnings');
131 } 131 }
132 if (found.hasNext()) { 132 if (found.hasNext()) {
133 do { 133 do {
134 print('Additional warning "${found.next()}"'); 134 print('Additional warning "${found.next()}"');
135 } while (found.hasNext()); 135 } while (found.hasNext());
136 fail('Too many warnings'); 136 fail('Too many warnings');
137 } 137 }
138 } 138 }
OLDNEW
« no previous file with comments | « frog/tests/leg/src/TypeGuardUnuserTest.dart ('k') | frog/tests/leg_only/src/NoSuchMethodTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698