Chromium Code Reviews| Index: tests/language/unsupported_operators_test.dart |
| diff --git a/tests/language/unsupported_operators_test.dart b/tests/language/unsupported_operators_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..af3886705e1a94173668fa425d8096bd34461705 |
| --- /dev/null |
| +++ b/tests/language/unsupported_operators_test.dart |
| @@ -0,0 +1,21 @@ |
| +// Copyright (c) 2013, 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. |
| + |
| +// Test handling of unsupported operators. |
| + |
| +library unsupported_operators; |
| + |
| +class C { |
| + m() { |
| + print(super === null); /// 01: compile-time error |
|
ahe
2013/08/06 14:48:40
print(
super === /// 01: compile-time error
null)
Johnni Winther
2013/08/07 06:56:25
Done.
|
| + print(super !== null); /// 02: compile-time error |
|
ahe
2013/08/06 14:48:40
Ditto.
Johnni Winther
2013/08/07 06:56:25
Done.
|
| + } |
| +} |
| + |
| +void main() { |
| + new C().m(); /// 01: continued |
|
ahe
2013/08/06 14:48:40
No need to use continue here.
Johnni Winther
2013/08/07 06:56:25
Done.
|
| + new C().m(); /// 02: continued |
| + print("foo" === null); /// 03: compile-time error |
|
ahe
2013/08/06 14:48:40
print("foo"
=== null /// 03: compile-time error
);
Johnni Winther
2013/08/07 06:56:25
Done.
|
| + print("foo" !== null); /// 04: compile-time error |
|
ahe
2013/08/06 14:48:40
Ditto.
Johnni Winther
2013/08/07 06:56:25
Done.
|
| +} |