OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.serialization_test_data; | 5 library dart2js.serialization_test_data; |
6 | 6 |
7 const List<Test> TESTS = const <Test>[ | 7 const List<Test> TESTS = const <Test>[ |
8 const Test('Empty program', const { | 8 const Test('Empty program', const { |
9 'main.dart': 'main() {}' | 9 'main.dart': 'main() {}' |
10 }), | 10 }), |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 'main.dart': r''' | 103 'main.dart': r''' |
104 class Class implements Comparable<Class, Class> { | 104 class Class implements Comparable<Class, Class> { |
105 int compareTo(other) => 0; | 105 int compareTo(other) => 0; |
106 } | 106 } |
107 main() { | 107 main() { |
108 print(new Class()); | 108 print(new Class()); |
109 }''' | 109 }''' |
110 }, | 110 }, |
111 expectedWarningCount: 1), | 111 expectedWarningCount: 1), |
112 | 112 |
113 const Test('Impliment Comparable with incompatible parameter types', const { | 113 const Test('Implement Comparable with incompatible parameter types', const { |
114 'main.dart': r''' | 114 'main.dart': r''' |
115 class Class implements Comparable<Class> { | 115 class Class implements Comparable<Class> { |
116 int compareTo(String other) => 0; | 116 int compareTo(String other) => 0; |
117 } | 117 } |
118 main() { | 118 main() { |
119 print(new Class().compareTo(null)); | 119 print(new Class().compareTo(null)); |
120 }''' | 120 }''' |
121 }, | 121 }, |
122 expectedWarningCount: 1, | 122 expectedWarningCount: 1, |
123 expectedInfoCount: 1), | 123 expectedInfoCount: 1), |
124 | 124 |
125 const Test('Impliment Comparable with incompatible parameter count', const { | 125 const Test('Implement Comparable with incompatible parameter count', const { |
126 'main.dart': r''' | 126 'main.dart': r''' |
127 class Class implements Comparable { | 127 class Class implements Comparable { |
128 bool compareTo(a, b) => true; | 128 bool compareTo(a, b) => true; |
129 } | 129 } |
130 main() { | 130 main() { |
131 print(new Class().compareTo(null, null)); | 131 print(new Class().compareTo(null, null)); |
132 }''' | 132 }''' |
133 }, | 133 }, |
134 expectedWarningCount: 1, | 134 expectedWarningCount: 1, |
135 expectedInfoCount: 1), | 135 expectedInfoCount: 1), |
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 const Test( | 589 const Test( |
590 this.name, | 590 this.name, |
591 this.sourceFiles, | 591 this.sourceFiles, |
592 {this.preserializedSourceFiles, | 592 {this.preserializedSourceFiles, |
593 this.unserializedSourceFiles, | 593 this.unserializedSourceFiles, |
594 this.expectedErrorCount: 0, | 594 this.expectedErrorCount: 0, |
595 this.expectedWarningCount: 0, | 595 this.expectedWarningCount: 0, |
596 this.expectedHintCount: 0, | 596 this.expectedHintCount: 0, |
597 this.expectedInfoCount: 0}); | 597 this.expectedInfoCount: 0}); |
598 } | 598 } |
OLD | NEW |