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.native_data_test; | 5 library dart2js.serialization.native_data_test; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
9 import 'package:compiler/src/common/names.dart'; | 9 import 'package:compiler/src/common/names.dart'; |
10 import 'package:compiler/src/commandline_options.dart'; | 10 import 'package:compiler/src/commandline_options.dart'; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 memorySourceFiles: serializedData.toMemorySourceFiles(), | 43 memorySourceFiles: serializedData.toMemorySourceFiles(), |
44 resolutionInputs: serializedData.toUris(), | 44 resolutionInputs: serializedData.toUris(), |
45 options: [Flags.analyzeAll]); | 45 options: [Flags.analyzeAll]); |
46 await compiler2.run(uri); | 46 await compiler2.run(uri); |
47 | 47 |
48 JavaScriptBackend backend1 = compiler1.backend; | 48 JavaScriptBackend backend1 = compiler1.backend; |
49 JavaScriptBackend backend2 = compiler2.backend; | 49 JavaScriptBackend backend2 = compiler2.backend; |
50 NativeData nativeData1 = backend1.nativeData; | 50 NativeData nativeData1 = backend1.nativeData; |
51 NativeData nativeData2 = backend2.nativeData; | 51 NativeData nativeData2 = backend2.nativeData; |
52 | 52 |
53 checkMaps( | 53 checkMaps(nativeData1.jsInteropNames, nativeData2.jsInteropNames, |
54 nativeData1.jsInteropNames, | 54 "NativeData.jsInteropNames", areElementsEquivalent, equality, |
55 nativeData2.jsInteropNames, | 55 verbose: verbose); |
56 "NativeData.jsInteropNames", | 56 |
57 areElementsEquivalent, | 57 checkMaps(nativeData1.nativeMemberName, nativeData2.nativeMemberName, |
58 equality, | 58 "NativeData.nativeMemberName", areElementsEquivalent, equality, |
| 59 verbose: verbose); |
| 60 |
| 61 checkMaps(nativeData1.nativeClassTagInfo, nativeData2.nativeClassTagInfo, |
| 62 "NativeData.nativeClassTagInfo", areElementsEquivalent, equality, |
59 verbose: verbose); | 63 verbose: verbose); |
60 | 64 |
61 checkMaps( | 65 checkMaps( |
62 nativeData1.nativeMemberName, | |
63 nativeData2.nativeMemberName, | |
64 "NativeData.nativeMemberName", | |
65 areElementsEquivalent, | |
66 equality, | |
67 verbose: verbose); | |
68 | |
69 checkMaps( | |
70 nativeData1.nativeClassTagInfo, | |
71 nativeData2.nativeClassTagInfo, | |
72 "NativeData.nativeClassTagInfo", | |
73 areElementsEquivalent, | |
74 equality, | |
75 verbose: verbose); | |
76 | |
77 checkMaps( | |
78 nativeData1.nativeMethodBehavior, | 66 nativeData1.nativeMethodBehavior, |
79 nativeData2.nativeMethodBehavior, | 67 nativeData2.nativeMethodBehavior, |
80 "NativeData.nativeMethodBehavior", | 68 "NativeData.nativeMethodBehavior", |
81 areElementsEquivalent, | 69 areElementsEquivalent, |
82 testNativeBehavior, | 70 testNativeBehavior, |
83 verbose: verbose); | 71 verbose: verbose); |
84 | 72 |
85 checkMaps( | 73 checkMaps( |
86 nativeData1.nativeFieldLoadBehavior, | 74 nativeData1.nativeFieldLoadBehavior, |
87 nativeData2.nativeFieldLoadBehavior, | 75 nativeData2.nativeFieldLoadBehavior, |
88 "NativeData.nativeFieldLoadBehavior", | 76 "NativeData.nativeFieldLoadBehavior", |
89 areElementsEquivalent, | 77 areElementsEquivalent, |
90 testNativeBehavior, | 78 testNativeBehavior, |
91 verbose: verbose); | 79 verbose: verbose); |
92 | 80 |
93 checkMaps( | 81 checkMaps( |
94 nativeData1.nativeFieldStoreBehavior, | 82 nativeData1.nativeFieldStoreBehavior, |
95 nativeData2.nativeFieldStoreBehavior, | 83 nativeData2.nativeFieldStoreBehavior, |
96 "NativeData.nativeFieldStoreBehavior", | 84 "NativeData.nativeFieldStoreBehavior", |
97 areElementsEquivalent, | 85 areElementsEquivalent, |
98 testNativeBehavior, | 86 testNativeBehavior, |
99 verbose: verbose); | 87 verbose: verbose); |
100 } | 88 } |
OLD | NEW |