Index: tests/language/runtime_type2_test.dart |
diff --git a/tests/language/runtime_type2_test.dart b/tests/language/runtime_type2_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e44d32ad30c927b03ded8d556ab7fb957a2915a8 |
--- /dev/null |
+++ b/tests/language/runtime_type2_test.dart |
@@ -0,0 +1,20 @@ |
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
+// 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:expect/expect.dart"; |
+ |
+class A { |
+ foo() => 499; |
+} |
+ |
+bar() => 42; |
+ |
+main() { |
+ String runtimeStringFoo = new A().foo.runtimeType.toString(); |
+ String runtimeStringBar = bar.runtimeType.toString(); |
+ Expect.isTrue( |
+ runtimeStringFoo != "" && runtimeStringFoo != "undefined"); |
sra1
2015/06/26 23:10:09
Can this be strengthened to expect a short name or
floitsch
2015/07/01 17:00:15
It's hard:
- the VM and dart2js disagree.
- after
sra1
2015/07/01 17:12:59
runtimeStringFoo.contains(vmstring) ||
runtimeStri
|
+ Expect.isTrue( |
+ runtimeStringBar != "" && runtimeStringBar != "undefined"); |
+} |