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

Unified Diff: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java

Issue 10915031: Issue 4796. Support for renaming named parameters in invocations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index 80b3db5a8e8d281a5f0b566a51c8c7ec468c2a57..bdcdc5a238c77ef0433210cdbc889ef9abc04874 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -4055,9 +4055,10 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
});
}
abstract void checkArgs(int invocationIndex);
- void assertId(int index, Object expected) {
+ void assertId(int index, String expectedParameterName) {
DartExpression argument = arguments.get(index);
- assertEquals(expected, argument.getInvocationParameterId());
+ String idString = argument.getInvocationParameterId().toString();
+ assertEquals("PARAMETER " + expectedParameterName, idString);
}
}
@@ -4077,21 +4078,21 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
void checkArgs(int invocationIndex) {
switch (invocationIndex) {
case 0: {
- assertId(0, Integer.valueOf(0));
- assertId(1, Integer.valueOf(1));
+ assertId(0, "a");
+ assertId(1, "b");
break;
}
case 1: {
- assertId(0, Integer.valueOf(0));
- assertId(1, Integer.valueOf(1));
- assertId(2, Integer.valueOf(2));
+ assertId(0, "a");
+ assertId(1, "b");
+ assertId(2, "c");
break;
}
case 3: {
- assertId(0, Integer.valueOf(0));
- assertId(1, Integer.valueOf(1));
- assertId(2, Integer.valueOf(2));
- assertId(3, Integer.valueOf(3));
+ assertId(0, "a");
+ assertId(1, "b");
+ assertId(2, "c");
+ assertId(3, "d");
break;
}
}
@@ -4116,25 +4117,25 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
void checkArgs(int invocationIndex) {
switch (invocationIndex) {
case 0: {
- assertId(0, Integer.valueOf(0));
- assertId(1, Integer.valueOf(1));
+ assertId(0, "a");
+ assertId(1, "b");
break;
}
case 1: {
- assertId(0, Integer.valueOf(0));
- assertId(1, Integer.valueOf(1));
+ assertId(0, "a");
+ assertId(1, "b");
assertId(2, "c");
break;
}
case 2: {
- assertId(0, Integer.valueOf(0));
- assertId(1, Integer.valueOf(1));
+ assertId(0, "a");
+ assertId(1, "b");
assertId(2, "d");
break;
}
case 3: {
- assertId(0, Integer.valueOf(0));
- assertId(1, Integer.valueOf(1));
+ assertId(0, "a");
+ assertId(1, "b");
assertId(2, "d");
assertId(3, "c");
break;
@@ -4179,7 +4180,6 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
}
/**
- * TODO(scheglov)
* <p>
* http://code.google.com/p/dart/issues/detail?id=3968
*/

Powered by Google App Engine
This is Rietveld 408576698