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

Unified Diff: tests/compiler/dart2js_extra/lookup_map/generic_type_test.dart

Issue 1320503003: dart2js: add initial support for lookup-maps (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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_extra/lookup_map/generic_type_test.dart
diff --git a/tests/language/deferred_function_type_lib.dart b/tests/compiler/dart2js_extra/lookup_map/generic_type_test.dart
similarity index 56%
copy from tests/language/deferred_function_type_lib.dart
copy to tests/compiler/dart2js_extra/lookup_map/generic_type_test.dart
index 1f0e610aac59572ef332c77ebb2d2acdac5ab189..1a2fd6e3e03d1e558e5afb30435cc1ba879bb452 100644
--- a/tests/language/deferred_function_type_lib.dart
+++ b/tests/compiler/dart2js_extra/lookup_map/generic_type_test.dart
@@ -2,19 +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.
+import 'package:lookup_map/lookup_map.dart';
import 'package:expect/expect.dart';
-class T {
- A foo(int x) {}
-}
-
class A{}
+class M<T>{ get type => T; }
+const map = const LookupMap(const [
+ A, 'the-text-for-A',
+]);
-typedef A F(int x);
-
-use(x) => x;
-
-runTest() {
- use(new A());
- Expect.isTrue(new T().foo is F);
+main() {
+ Expect.equals(map[new M<A>().type], 'the-text-for-A');
}

Powered by Google App Engine
This is Rietveld 408576698