| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import "dart:uri"; | 5 import "dart:uri"; |
| 6 import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t"; | 6 import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t"; |
| 7 import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt'; | 7 import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.da
rt'; |
| 8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; | 8 import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart'; |
| 9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; | 9 import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart'; |
| 10 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; | 10 import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart'; |
| (...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 } else { | 1016 } else { |
| 1017 x = 42; | 1017 x = 42; |
| 1018 } | 1018 } |
| 1019 x; | 1019 x; |
| 1020 } | 1020 } |
| 1021 """; | 1021 """; |
| 1022 AnalysisResult result = analyze(source); | 1022 AnalysisResult result = analyze(source); |
| 1023 result.checkNodeHasUnknownType('x'); | 1023 result.checkNodeHasUnknownType('x'); |
| 1024 } | 1024 } |
| 1025 | 1025 |
| 1026 testIsCheck() { |
| 1027 final String source = r""" |
| 1028 main () { |
| 1029 var x = (1 is String); |
| 1030 x; |
| 1031 } |
| 1032 """; |
| 1033 AnalysisResult result = analyze(source); |
| 1034 result.checkNodeHasType('x', [result.bool]); |
| 1035 } |
| 1036 |
| 1026 void main() { | 1037 void main() { |
| 1027 testDynamicBackDoor(); | 1038 testDynamicBackDoor(); |
| 1028 testLiterals(); | 1039 testLiterals(); |
| 1029 testRedefinition(); | 1040 testRedefinition(); |
| 1030 testIfThenElse(); | 1041 testIfThenElse(); |
| 1031 testTernaryIf(); | 1042 testTernaryIf(); |
| 1032 testWhile(); | 1043 testWhile(); |
| 1033 testFor1(); | 1044 testFor1(); |
| 1034 testFor2(); | 1045 testFor2(); |
| 1035 // testToplevelVariable(); // toplevel variables are not yet supported | 1046 // testToplevelVariable(); // toplevel variables are not yet supported |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1056 testSetIndexOperator(); | 1067 testSetIndexOperator(); |
| 1057 testInequality(); | 1068 testInequality(); |
| 1058 // testFieldInitialization(); // TODO(polux) | 1069 // testFieldInitialization(); // TODO(polux) |
| 1059 testSendWithWrongArity(); | 1070 testSendWithWrongArity(); |
| 1060 testBigTypesWidening1(); | 1071 testBigTypesWidening1(); |
| 1061 testBigTypesWidening2(); | 1072 testBigTypesWidening2(); |
| 1062 testDynamicIsAbsorbing(); | 1073 testDynamicIsAbsorbing(); |
| 1063 testLists(); | 1074 testLists(); |
| 1064 testListWithCapacity(); | 1075 testListWithCapacity(); |
| 1065 testEmptyList(); | 1076 testEmptyList(); |
| 1077 testIsCheck(); |
| 1066 } | 1078 } |
| OLD | NEW |