Chromium Code Reviews| Index: tests/language/src/MapLiteral1NegativeTest.dart |
| diff --git a/tests/language/src/MapLiteral1NegativeTest.dart b/tests/language/src/MapLiteral1NegativeTest.dart |
| index 5490091049b8413c05a0c45ba0b3222b4416dd1a..3f819df2a424ccdbacfedbb03eded4f567aff826 100644 |
| --- a/tests/language/src/MapLiteral1NegativeTest.dart |
| +++ b/tests/language/src/MapLiteral1NegativeTest.dart |
| @@ -3,20 +3,15 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| // VMOptions=--enable_type_checks |
| // |
| -// Dart test program testing type checks in map literals. |
| +// When type checks are enabled, a type mismatch in an array literal is a compile-time error |
|
scheglov
2012/01/26 15:54:42
"array literal"?
Probably "map literal".
zundel
2012/01/26 17:39:51
Done.
|
| -class MapLiteral1NegativeTest { |
| - test() { |
| - try { |
| - var m = const <String>{"a": 0}; // 0 is not a String. |
| - } catch (TypeError error) { |
| - } |
| +main() { |
| + try { |
| + var m = const <String>{"a": 0}; // 0 is not a String. |
| + } catch (TypeError error) { |
| + // not a catchable error |
| } |
| } |
| -main() { |
| - var t = new MapLiteral1NegativeTest(); |
| - t.test(); |
| -} |