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

Unified Diff: tests/compiler/dart2js/resolver_test.dart

Issue 22871009: Address long-standing review comments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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/compiler/dart2js/resolver_test.dart
===================================================================
--- tests/compiler/dart2js/resolver_test.dart (revision 26191)
+++ tests/compiler/dart2js/resolver_test.dart (working copy)
@@ -76,6 +76,7 @@
testIncrementsAndDecrements();
testOverrideHashCodeCheck();
testSupertypeOrder();
+ testConstructorArgumentMismatch();
}
testSupertypeOrder() {
@@ -575,6 +576,20 @@
Expect.isTrue(element.isSynthesized);
}
+testConstructorArgumentMismatch() {
+ String script = "class A {} foo() { print(new A(42)); }";
+ MockCompiler compiler = new MockCompiler();
+ compiler.parseScript(script);
+ FunctionElement fooElement = compiler.mainApp.find(buildSourceString('foo'));
+ Expect.isNotNull(fooElement);
+ fooElement.parseNode(compiler);
+ compiler.resolver.resolve(fooElement);
+
+ compareWarningKinds(
+ script, [MessageKind.INVALID_ARGUMENTS.warning], compiler.warnings);
+ compareWarningKinds(script, [], compiler.errors);
+}
+
testTopLevelFields() {
MockCompiler compiler = new MockCompiler();
compiler.parseScript("int a;");
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/optimize.dart ('k') | tests/language/closure_in_initializer2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698