| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 'a.dart': ''' | 368 'a.dart': ''' |
| 369 void foo() {} | 369 void foo() {} |
| 370 ''', | 370 ''', |
| 371 }), | 371 }), |
| 372 | 372 |
| 373 const Test('fromEnvironment constants', const { | 373 const Test('fromEnvironment constants', const { |
| 374 'main.dart': ''' | 374 'main.dart': ''' |
| 375 main() => const String.fromEnvironment("foo"); | 375 main() => const String.fromEnvironment("foo"); |
| 376 ''', | 376 ''', |
| 377 }), | 377 }), |
| 378 |
| 379 const Test('Disable tree shaking through reflection', const { |
| 380 'main.dart': ''' |
| 381 import 'dart:mirrors'; |
| 382 |
| 383 main() { |
| 384 reflect(null).invoke(#toString, []).reflectee; |
| 385 } |
| 386 ''', |
| 387 }, expectedWarningCount: 1), |
| 378 ]; | 388 ]; |
| 379 | 389 |
| 380 class Test { | 390 class Test { |
| 381 final String name; | 391 final String name; |
| 382 final Map sourceFiles; | 392 final Map sourceFiles; |
| 383 final Map preserializedSourceFiles; | 393 final Map preserializedSourceFiles; |
| 384 final Map unserializedSourceFiles; | 394 final Map unserializedSourceFiles; |
| 385 final int expectedErrorCount; | 395 final int expectedErrorCount; |
| 386 final int expectedWarningCount; | 396 final int expectedWarningCount; |
| 387 final int expectedHintCount; | 397 final int expectedHintCount; |
| 388 final int expectedInfoCount; | 398 final int expectedInfoCount; |
| 389 | 399 |
| 390 const Test( | 400 const Test( |
| 391 this.name, | 401 this.name, |
| 392 this.sourceFiles, | 402 this.sourceFiles, |
| 393 {this.preserializedSourceFiles, | 403 {this.preserializedSourceFiles, |
| 394 this.unserializedSourceFiles, | 404 this.unserializedSourceFiles, |
| 395 this.expectedErrorCount: 0, | 405 this.expectedErrorCount: 0, |
| 396 this.expectedWarningCount: 0, | 406 this.expectedWarningCount: 0, |
| 397 this.expectedHintCount: 0, | 407 this.expectedHintCount: 0, |
| 398 this.expectedInfoCount: 0}); | 408 this.expectedInfoCount: 0}); |
| 399 } | 409 } |
| OLD | NEW |