| 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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 430 }, preserializedSourceFiles: const { | 430 }, preserializedSourceFiles: const { |
| 431 'a.dart': ''' | 431 'a.dart': ''' |
| 432 class B { | 432 class B { |
| 433 call(a) {} | 433 call(a) {} |
| 434 } | 434 } |
| 435 class C { | 435 class C { |
| 436 call() {} | 436 call() {} |
| 437 } | 437 } |
| 438 ''', | 438 ''', |
| 439 }), | 439 }), |
| 440 |
| 441 const Test('Double literal in constant constructor', const { |
| 442 'main.dart': ''' |
| 443 import 'a.dart'; |
| 444 |
| 445 main() { |
| 446 const A(1.0); |
| 447 } |
| 448 ''', |
| 449 }, preserializedSourceFiles: const { |
| 450 'a.dart': ''' |
| 451 class A { |
| 452 final field1; |
| 453 const A(a) : this.field1 = a + 1.0; |
| 454 } |
| 455 ''', |
| 456 }), |
| 440 ]; | 457 ]; |
| 441 | 458 |
| 442 class Test { | 459 class Test { |
| 443 final String name; | 460 final String name; |
| 444 final Map sourceFiles; | 461 final Map sourceFiles; |
| 445 final Map preserializedSourceFiles; | 462 final Map preserializedSourceFiles; |
| 446 final Map unserializedSourceFiles; | 463 final Map unserializedSourceFiles; |
| 447 final int expectedErrorCount; | 464 final int expectedErrorCount; |
| 448 final int expectedWarningCount; | 465 final int expectedWarningCount; |
| 449 final int expectedHintCount; | 466 final int expectedHintCount; |
| 450 final int expectedInfoCount; | 467 final int expectedInfoCount; |
| 451 | 468 |
| 452 const Test( | 469 const Test( |
| 453 this.name, | 470 this.name, |
| 454 this.sourceFiles, | 471 this.sourceFiles, |
| 455 {this.preserializedSourceFiles, | 472 {this.preserializedSourceFiles, |
| 456 this.unserializedSourceFiles, | 473 this.unserializedSourceFiles, |
| 457 this.expectedErrorCount: 0, | 474 this.expectedErrorCount: 0, |
| 458 this.expectedWarningCount: 0, | 475 this.expectedWarningCount: 0, |
| 459 this.expectedHintCount: 0, | 476 this.expectedHintCount: 0, |
| 460 this.expectedInfoCount: 0}); | 477 this.expectedInfoCount: 0}); |
| 461 } | 478 } |
| OLD | NEW |