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

Unified Diff: pkg/smoke/test/common.dart

Issue 180273004: Fixes in smoke, which in turn should fix todomvc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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
« no previous file with comments | « pkg/smoke/lib/static.dart ('k') | pkg/smoke/test/static_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/smoke/test/common.dart
diff --git a/pkg/smoke/test/common.dart b/pkg/smoke/test/common.dart
index 85c28946af98cf1d731a47d35d077a89ec5ab585..d60679f56a7a114478a968524494ad68e83d0921 100644
--- a/pkg/smoke/test/common.dart
+++ b/pkg/smoke/test/common.dart
@@ -199,6 +199,21 @@ main() {
expect(d.type, int);
});
+ test('isSuperclass', () {
+ expect(smoke.isSubclassOf(D, C), isTrue);
+ expect(smoke.isSubclassOf(H, G), isTrue);
+ expect(smoke.isSubclassOf(H, H), isTrue);
+ expect(smoke.isSubclassOf(H, Object), isTrue);
+ expect(smoke.isSubclassOf(B, Object), isTrue);
+ expect(smoke.isSubclassOf(A, Object), isTrue);
+ expect(smoke.isSubclassOf(AnnotB, Annot), isTrue);
+
+ expect(smoke.isSubclassOf(D, A), isFalse);
+ expect(smoke.isSubclassOf(H, B), isFalse);
+ expect(smoke.isSubclassOf(B, A), isFalse);
+ expect(smoke.isSubclassOf(Object, A), isFalse);
+ });
+
group('query', () {
test('default', () {
var options = new smoke.QueryOptions();
@@ -258,14 +273,14 @@ main() {
var options = new smoke.QueryOptions(includeInherited: true,
withAnnotations: const [Annot]);
var res = smoke.query(H, options);
- expect(res.map((e) => e.name), [#b, #f, #g]);
+ expect(res.map((e) => e.name), [#b, #f, #g, #i]);
});
test('mixed annotations (type and exact)', () {
var options = new smoke.QueryOptions(includeInherited: true,
withAnnotations: const [a2, Annot]);
var res = smoke.query(H, options);
- expect(res.map((e) => e.name), [#b, #d, #f, #g, #h]);
+ expect(res.map((e) => e.name), [#b, #d, #f, #g, #h, #i]);
});
test('symbol to name', () {
@@ -339,8 +354,10 @@ class F {
class F2 extends F {}
class Annot { const Annot(); }
+class AnnotB extends Annot { const AnnotB(); }
const a1 = const Annot();
const a2 = 32;
+const a3 = const AnnotB();
class G {
@@ -355,4 +372,5 @@ class H extends G {
@a1 int f;
@a1 int g;
@a2 int h;
+ @a3 int i;
}
« no previous file with comments | « pkg/smoke/lib/static.dart ('k') | pkg/smoke/test/static_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698