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

Unified Diff: tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart

Issue 3005823002: Handle forwarding constructors to unnamed mixin applications (Closed)
Patch Set: Updated cf. comments Created 3 years, 3 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/kernel/compile_from_dill_test_helper.dart
diff --git a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
index b80afeb305c69494bf9abcb55cceaf424bc44113..ab9df9c05d2467b9155b6e14a5527e098eabf511 100644
--- a/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
+++ b/tests/compiler/dart2js/kernel/compile_from_dill_test_helper.dart
@@ -18,6 +18,7 @@ import 'package:compiler/src/kernel/element_map.dart';
import 'package:compiler/src/kernel/kernel_backend_strategy.dart';
import 'package:compiler/src/kernel/kernel_strategy.dart';
import 'package:compiler/src/serialization/equivalence.dart';
+import 'package:compiler/src/resolution/class_hierarchy.dart';
import 'package:compiler/src/resolution/enum_creator.dart';
import 'package:compiler/src/universe/world_builder.dart';
import 'package:compiler/src/world.dart';
@@ -79,6 +80,20 @@ var toplevel;
typedef Typedef();
+class Mixin1 {
+ var field1;
+}
+
+class Mixin2 {
+ var field2;
+}
+
+class MixinSub1 extends Object with Mixin1 {
+}
+
+class MixinSub2 extends Object with Mixin1, Mixin2 {
+}
+
main() {
foo();
bar(true);
@@ -141,6 +156,8 @@ main() {
x = f(x);
x = Object;
x = Typedef;
+ new MixinSub2();
+ new MixinSub1();
return x;
}
typedef NoArg();
@@ -274,6 +291,7 @@ Future<ResultKind> runTest(
enableDebugMode();
EnumCreator.matchKernelRepresentationForTesting = true;
Elements.usePatchedDart2jsSdkSorting = true;
+ useOptimizedMixins = true;
entryPoint =
await createTemp(entryPoint, memorySourceFiles, printSteps: true);
@@ -333,6 +351,7 @@ Future<ResultKind> runTest(
}
prefix++;
}
+ if (prefix > 0) prefix--;
int suffix1 = lines1.length - 1;
int suffix2 = lines2.length - 1;
while (suffix1 >= 0 && suffix2 >= 0) {
@@ -342,6 +361,8 @@ Future<ResultKind> runTest(
suffix1--;
suffix2--;
}
+ if (suffix1 + 1 < lines1.length) suffix1++;
+ if (suffix2 + 1 < lines2.length) suffix2++;
print('--- from source, lines [${prefix}-${suffix1}] ------------------');
lines1.sublist(prefix, suffix1 + 1).forEach(print);
print('--- from dill, lines [${prefix}-${suffix2}] --------------------');

Powered by Google App Engine
This is Rietveld 408576698