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

Unified Diff: tests/kernel/unsorted/invocation_errors_test.dart

Issue 2451623006: Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork." (Closed)
Patch Set: Fix Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: tests/kernel/unsorted/invocation_errors_test.dart
diff --git a/tests/language/regress_25550_test.dart b/tests/kernel/unsorted/invocation_errors_test.dart
similarity index 56%
copy from tests/language/regress_25550_test.dart
copy to tests/kernel/unsorted/invocation_errors_test.dart
index 4a8a7c5954d202d9a9d53f401efb13be36277c0b..dca63bc04640799d9c58cd6e5659a21ce806ca7e 100644
--- a/tests/language/regress_25550_test.dart
+++ b/tests/kernel/unsorted/invocation_errors_test.dart
@@ -2,16 +2,15 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-typedef int Adder(int a, int b);
+// Erroneous cases of invocations.
-class Mock {
- noSuchMethod(i) => null;
-}
+import 'expect.dart';
-class MockAdder extends Mock {
- int call(int a, int b);
+test0(x) {
+ print('test0');
}
main() {
- Adder adder = new MockAdder();
+ // Incorrect number of arguments, should be NoSuchMethodError but crashes.
+ test0(0, 1);
}
« no previous file with comments | « tests/kernel/unsorted/instance_getters_and_setters_test.dart ('k') | tests/kernel/unsorted/invocation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698