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

Unified Diff: tests/language/src/GenericTest.dart

Issue 9956116: Make test non vm-specific (cl 9969122 follow up). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 | « runtime/tests/vm/src/GenericTest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/src/GenericTest.dart
===================================================================
--- tests/language/src/GenericTest.dart (revision 6145)
+++ tests/language/src/GenericTest.dart (working copy)
@@ -44,24 +44,23 @@
class GenericTest {
static test() {
int result = 0;
+ D d = new D();
+ Expect.equals(true, d.caa_.b_ is B<AA>);
+ Expect.equals(true, d.caa_.b_.isT(const AA()));
+ C c = new C(const AA()); // c is of raw type C, T in C<T> is Dynamic.
+ Expect.equals(true, c.b_ is B);
+ Expect.equals(true, c.b_ is B<AA>);
+ Expect.equals(true, c.b_.isT(const AA()));
+ Expect.equals(true, c.b_.isT(const AX()));
try {
- D d = new D();
- Expect.equals(true, d.caa_.b_ is B<AA>);
- Expect.equals(true, d.caa_.b_.isT(const AA()));
- C c = new C(const AA()); // c is of raw type C, T in C<T> is Dynamic.
- Expect.equals(true, c.b_ is B);
- Expect.equals(true, c.b_ is B<AA>);
- Expect.equals(true, c.b_.isT(const AA()));
- Expect.equals(true, c.b_.isT(const AX()));
E e = new E(); // Throws a type error, if type checks are enabled.
} catch (TypeError error) {
result = 1;
// TODO(regis): The error below is detected too late.
- // It should be reported on line 26, at new B<AX>().
+ // It should be reported on line 31, at new B<T>(), i.e. new B<AX>().
// This will be detected when we check the subtyping constraints.
Expect.equals("A", error.dstType);
Expect.equals("AX", error.srcType);
- Expect.equals("a_", error.dstName);
int pos = error.url.lastIndexOf("/", error.url.length);
if (pos == -1) {
pos = error.url.lastIndexOf("\\", error.url.length);
« no previous file with comments | « runtime/tests/vm/src/GenericTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698