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

Unified Diff: tests/compiler/dart2js_native/native_mixin_test.dart

Issue 12079020: Extends native mixin tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « tests/compiler/dart2js_native/native_mixin_multiple_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js_native/native_mixin_test.dart
diff --git a/tests/compiler/dart2js_native/native_mixin_test.dart b/tests/compiler/dart2js_native/native_mixin_test.dart
index 197a085d11eeb460fea6956d9738c00f25b69085..7dfdd5de3c6c5d8f460eae0513efde2bce20a857 100644
--- a/tests/compiler/dart2js_native/native_mixin_test.dart
+++ b/tests/compiler/dart2js_native/native_mixin_test.dart
@@ -5,8 +5,8 @@
// Test that native classes can use ordinary Dart classes as mixins.
class A native "*A" {
- foo() => 42;
- baz() => 99;
+ foo() => "A-foo";
+ baz() => "A-baz";
}
class B extends A with M native "*B" {
@@ -14,8 +14,8 @@ class B extends A with M native "*B" {
}
class M {
- foo() => 87;
- bar() => 101;
+ foo() => "M-foo";
+ bar() => "M-bar";
}
A makeA() native;
@@ -31,24 +31,24 @@ makeB = function(){return new B;};
main() {
setup();
A a = makeA();
- Expect.equals(42, a.foo());
+ Expect.equals("A-foo", a.foo());
Expect.throws(() => a.bar(), (error) => error is NoSuchMethodError);
- Expect.equals(99, a.baz());
+ Expect.equals("A-baz", a.baz());
Expect.isTrue(a is A);
Expect.isFalse(a is B);
Expect.isFalse(a is M);
B b = makeB();
- Expect.equals(87, b.foo());
- Expect.equals(99, b.bar());
- Expect.equals(99, b.baz());
+ Expect.equals("M-foo", b.foo());
+ Expect.equals("A-baz", b.bar());
+ Expect.equals("A-baz", b.baz());
Expect.isTrue(b is A);
Expect.isTrue(b is B);
Expect.isTrue(b is M);
M m = new M();
- Expect.equals(87, m.foo());
- Expect.equals(101, m.bar());
+ Expect.equals("M-foo", m.foo());
+ Expect.equals("M-bar", m.bar());
Expect.throws(() => m.baz(), (error) => error is NoSuchMethodError);
Expect.isFalse(m is A);
Expect.isFalse(m is B);
« no previous file with comments | « tests/compiler/dart2js_native/native_mixin_multiple_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698