| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.semantics_visitor_test; | 5 library dart2js.semantics_visitor_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:mirrors'; | 8 import 'dart:mirrors'; |
| 9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
| 10 import 'package:expect/expect.dart'; | 10 import 'package:expect/expect.dart'; |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1869 right: '42')), | 1869 right: '42')), |
| 1870 ], | 1870 ], |
| 1871 'Not equals': const [ | 1871 'Not equals': const [ |
| 1872 // Not equals | 1872 // Not equals |
| 1873 const Test( | 1873 const Test( |
| 1874 ''' | 1874 ''' |
| 1875 m() => 2 != 3; | 1875 m() => 2 != 3; |
| 1876 ''', | 1876 ''', |
| 1877 const Visit(VisitKind.VISIT_NOT_EQUALS, | 1877 const Visit(VisitKind.VISIT_NOT_EQUALS, |
| 1878 left: '2', right: '3')), | 1878 left: '2', right: '3')), |
| 1879 // TODO(johnniwinther): Enable this. Resolution does not store the element. | 1879 const Test.clazz( |
| 1880 /*const Test.clazz( | |
| 1881 ''' | 1880 ''' |
| 1882 class B { | 1881 class B { |
| 1883 operator ==(_) => null; | 1882 operator ==(_) => null; |
| 1884 } | 1883 } |
| 1885 class C extends B { | 1884 class C extends B { |
| 1886 m() => super != 42; | 1885 m() => super != 42; |
| 1887 } | 1886 } |
| 1888 ''', | 1887 ''', |
| 1889 const Visit(VisitKind.VISIT_SUPER_NOT_EQUALS, | 1888 const Visit(VisitKind.VISIT_SUPER_NOT_EQUALS, |
| 1890 element: 'function(B#==)', | 1889 element: 'function(B#==)', |
| 1891 right: '42')),*/ | 1890 right: '42')), |
| 1892 ], | 1891 ], |
| 1893 'Unary expression': const [ | 1892 'Unary expression': const [ |
| 1894 // Unary expression | 1893 // Unary expression |
| 1895 const Test( | 1894 const Test( |
| 1896 ''' | 1895 ''' |
| 1897 m() => -false; | 1896 m() => -false; |
| 1898 ''', | 1897 ''', |
| 1899 const Visit(VisitKind.VISIT_UNARY, | 1898 const Visit(VisitKind.VISIT_UNARY, |
| 1900 expression: 'false', operator: '-')), | 1899 expression: 'false', operator: '-')), |
| 1901 const Test( | 1900 const Test( |
| (...skipping 2360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4262 VisitKind.VISIT_STATIC_METHOD_SETTER_POSTFIX, | 4261 VisitKind.VISIT_STATIC_METHOD_SETTER_POSTFIX, |
| 4263 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND, | 4262 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND, |
| 4264 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX, | 4263 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX, |
| 4265 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX, | 4264 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX, |
| 4266 VisitKind.VISIT_SUPER_FIELD_FIELD_COMPOUND, | 4265 VisitKind.VISIT_SUPER_FIELD_FIELD_COMPOUND, |
| 4267 VisitKind.VISIT_SUPER_FIELD_FIELD_PREFIX, | 4266 VisitKind.VISIT_SUPER_FIELD_FIELD_PREFIX, |
| 4268 VisitKind.VISIT_SUPER_FIELD_FIELD_POSTFIX, | 4267 VisitKind.VISIT_SUPER_FIELD_FIELD_POSTFIX, |
| 4269 VisitKind.VISIT_SUPER_METHOD_SETTER_COMPOUND, | 4268 VisitKind.VISIT_SUPER_METHOD_SETTER_COMPOUND, |
| 4270 VisitKind.VISIT_SUPER_METHOD_SETTER_PREFIX, | 4269 VisitKind.VISIT_SUPER_METHOD_SETTER_PREFIX, |
| 4271 VisitKind.VISIT_SUPER_METHOD_SETTER_POSTFIX, | 4270 VisitKind.VISIT_SUPER_METHOD_SETTER_POSTFIX, |
| 4272 VisitKind.VISIT_SUPER_NOT_EQUALS, | |
| 4273 VisitKind.VISIT_CLASS_TYPE_LITERAL_SET, | 4271 VisitKind.VISIT_CLASS_TYPE_LITERAL_SET, |
| 4274 VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET, | 4272 VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET, |
| 4275 VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET, | 4273 VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET, |
| 4276 VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET, | 4274 VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET, |
| 4277 VisitKind.VISIT_FINAL_PARAMETER_SET, | 4275 VisitKind.VISIT_FINAL_PARAMETER_SET, |
| 4278 VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET, | 4276 VisitKind.VISIT_FINAL_LOCAL_VARIABLE_SET, |
| 4279 VisitKind.VISIT_LOCAL_FUNCTION_SET, | 4277 VisitKind.VISIT_LOCAL_FUNCTION_SET, |
| 4280 VisitKind.VISIT_STATIC_GETTER_SET, | 4278 VisitKind.VISIT_STATIC_GETTER_SET, |
| 4281 VisitKind.VISIT_STATIC_SETTER_GET, | 4279 VisitKind.VISIT_STATIC_SETTER_GET, |
| 4282 VisitKind.VISIT_STATIC_SETTER_INVOKE, | 4280 VisitKind.VISIT_STATIC_SETTER_INVOKE, |
| (...skipping 3787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8070 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL, | 8068 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL, |
| 8071 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL, | 8069 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL, |
| 8072 VISIT_NAMED_INITIALIZING_FORMAL_DECL, | 8070 VISIT_NAMED_INITIALIZING_FORMAL_DECL, |
| 8073 | 8071 |
| 8074 VISIT_UNRESOLVED_COMPOUND, | 8072 VISIT_UNRESOLVED_COMPOUND, |
| 8075 VISIT_UNRESOLVED_PREFIX, | 8073 VISIT_UNRESOLVED_PREFIX, |
| 8076 VISIT_UNRESOLVED_POSTFIX, | 8074 VISIT_UNRESOLVED_POSTFIX, |
| 8077 | 8075 |
| 8078 // TODO(johnniwinther): Add tests for more error cases. | 8076 // TODO(johnniwinther): Add tests for more error cases. |
| 8079 } | 8077 } |
| OLD | NEW |