Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(273)

Side by Side Diff: tests/compiler/dart2js/serialization/native_data_test.dart

Issue 2738513007: Split NativeDataImpl (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/native/resolver.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 29 matching lines...) Expand all
40 print('analyze deserialized: $uri'); 40 print('analyze deserialized: $uri');
41 print('------------------------------------------------------------------'); 41 print('------------------------------------------------------------------');
42 Compiler compiler2 = compilerFor( 42 Compiler compiler2 = compilerFor(
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 NativeClassDataImpl nativeClassData1 = backend1.nativeClassData;
51 NativeClassDataImpl nativeClassData2 = backend2.nativeClassData;
50 NativeDataImpl nativeData1 = backend1.nativeData; 52 NativeDataImpl nativeData1 = backend1.nativeData;
51 NativeDataImpl nativeData2 = backend2.nativeData; 53 NativeDataImpl nativeData2 = backend2.nativeData;
52 54
53 checkMaps( 55 checkMaps(
54 nativeData1.jsInteropLibraryNames, 56 nativeData1.jsInteropLibraryNames,
55 nativeData2.jsInteropLibraryNames, 57 nativeData2.jsInteropLibraryNames,
56 "NativeData.jsInteropLibraryNames", 58 "NativeData.jsInteropLibraryNames",
57 areElementsEquivalent, 59 areElementsEquivalent,
58 equality, 60 equality,
59 verbose: verbose); 61 verbose: verbose);
60 62
61 checkMaps(nativeData1.jsInteropClassNames, nativeData2.jsInteropClassNames, 63 checkMaps(nativeData1.jsInteropClassNames, nativeData2.jsInteropClassNames,
62 "NativeData.jsInteropClassNames", areElementsEquivalent, equality, 64 "NativeData.jsInteropClassNames", areElementsEquivalent, equality,
63 verbose: verbose); 65 verbose: verbose);
64 66
65 checkMaps(nativeData1.jsInteropMemberNames, nativeData2.jsInteropMemberNames, 67 checkMaps(nativeData1.jsInteropMemberNames, nativeData2.jsInteropMemberNames,
66 "NativeData.jsInteropMemberNames", areElementsEquivalent, equality, 68 "NativeData.jsInteropMemberNames", areElementsEquivalent, equality,
67 verbose: verbose); 69 verbose: verbose);
68 70
69 checkMaps(nativeData1.nativeMemberName, nativeData2.nativeMemberName, 71 checkMaps(nativeData1.nativeMemberName, nativeData2.nativeMemberName,
70 "NativeData.nativeMemberName", areElementsEquivalent, equality, 72 "NativeData.nativeMemberName", areElementsEquivalent, equality,
71 verbose: verbose); 73 verbose: verbose);
72 74
73 checkMaps(nativeData1.nativeClassTagInfo, nativeData2.nativeClassTagInfo, 75 checkMaps(
74 "NativeData.nativeClassTagInfo", areElementsEquivalent, equality, 76 nativeClassData1.nativeClassTagInfo,
77 nativeClassData2.nativeClassTagInfo,
78 "NativeData.nativeClassTagInfo",
79 areElementsEquivalent,
80 equality,
75 verbose: verbose); 81 verbose: verbose);
76 82
77 checkMaps( 83 checkMaps(
78 nativeData1.nativeMethodBehavior, 84 nativeData1.nativeMethodBehavior,
79 nativeData2.nativeMethodBehavior, 85 nativeData2.nativeMethodBehavior,
80 "NativeData.nativeMethodBehavior", 86 "NativeData.nativeMethodBehavior",
81 areElementsEquivalent, 87 areElementsEquivalent,
82 testNativeBehavior, 88 testNativeBehavior,
83 verbose: verbose); 89 verbose: verbose);
84 90
85 checkMaps( 91 checkMaps(
86 nativeData1.nativeFieldLoadBehavior, 92 nativeData1.nativeFieldLoadBehavior,
87 nativeData2.nativeFieldLoadBehavior, 93 nativeData2.nativeFieldLoadBehavior,
88 "NativeData.nativeFieldLoadBehavior", 94 "NativeData.nativeFieldLoadBehavior",
89 areElementsEquivalent, 95 areElementsEquivalent,
90 testNativeBehavior, 96 testNativeBehavior,
91 verbose: verbose); 97 verbose: verbose);
92 98
93 checkMaps( 99 checkMaps(
94 nativeData1.nativeFieldStoreBehavior, 100 nativeData1.nativeFieldStoreBehavior,
95 nativeData2.nativeFieldStoreBehavior, 101 nativeData2.nativeFieldStoreBehavior,
96 "NativeData.nativeFieldStoreBehavior", 102 "NativeData.nativeFieldStoreBehavior",
97 areElementsEquivalent, 103 areElementsEquivalent,
98 testNativeBehavior, 104 testNativeBehavior,
99 verbose: verbose); 105 verbose: verbose);
100 } 106 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/native/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698