@@ -20,23 +20,16 @@ void main() {
2020
2121 late Directory tempDir;
2222 late String sdkDirectory;
23- late String soundSdkSummaryPath ;
23+ late String sdkSummaryPath ;
2424 late String compilerWorkerPath;
2525
26- // Missing sound assets
27- late String soundSdkFullDillPath;
28- late String soundAmdSdkJsPath;
29- late String soundAmdSdkJsMapPath;
30- late String soundDdcSdkJsPath;
31- late String soundDdcSdkJsMapPath;
32-
33- // Missing weak assets
34- late String weakSdkSummaryPath;
35- late String weakSdkFullDillPath;
36- late String weakAmdSdkJsPath;
37- late String weakAmdSdkJsMapPath;
38- late String weakDdcSdkJsPath;
39- late String weakDdcSdkJsMapPath;
26+ // Missing assets
27+ late String sdkFullDillPath;
28+ late String amdSdkJsPath;
29+ late String amdSdkJsMapPath;
30+ late String ddcSdkJsPath;
31+ late String ddcSdkJsMapPath;
32+
4033
4134 setUp (() async {
4235 setCurrentLogWriter (debug: debug);
@@ -45,39 +38,24 @@ void main() {
4538 sdkDirectory = tempDir.path;
4639 final copySdkLayout = TestSdkLayout .createDefault (sdkDirectory);
4740
48- soundSdkSummaryPath = copySdkLayout.soundSummaryPath ;
41+ sdkSummaryPath = copySdkLayout.summaryPath ;
4942 compilerWorkerPath = copySdkLayout.dartdevcSnapshotPath;
5043
5144 // Copy the SDK directory into a temp directory.
5245 await copyDirectory (TestSdkLayout .defaultSdkDirectory, sdkDirectory);
5346
54- // Simulate missing sound assets.
55- soundSdkFullDillPath = copySdkLayout.soundFullDillPath;
56- soundAmdSdkJsPath = copySdkLayout.soundAmdJsPath;
57- soundAmdSdkJsMapPath = copySdkLayout.soundAmdJsMapPath;
58- soundDdcSdkJsPath = copySdkLayout.soundDdcJsPath;
59- soundDdcSdkJsMapPath = copySdkLayout.soundDdcJsMapPath;
60-
61- _deleteIfExists (soundSdkFullDillPath);
62- _deleteIfExists (soundAmdSdkJsPath);
63- _deleteIfExists (soundAmdSdkJsMapPath);
64- _deleteIfExists (soundDdcSdkJsPath);
65- _deleteIfExists (soundDdcSdkJsMapPath);
66-
67- // Simulate missing weak assets.
68- weakSdkSummaryPath = copySdkLayout.weakSummaryPath;
69- weakSdkFullDillPath = copySdkLayout.weakFullDillPath;
70- weakAmdSdkJsPath = copySdkLayout.weakAmdJsPath;
71- weakAmdSdkJsMapPath = copySdkLayout.weakAmdJsMapPath;
72- weakDdcSdkJsPath = copySdkLayout.weakDdcJsPath;
73- weakDdcSdkJsMapPath = copySdkLayout.weakDdcJsMapPath;
74-
75- _deleteIfExists (weakSdkSummaryPath);
76- _deleteIfExists (weakSdkFullDillPath);
77- _deleteIfExists (weakAmdSdkJsPath);
78- _deleteIfExists (weakAmdSdkJsMapPath);
79- _deleteIfExists (weakDdcSdkJsPath);
80- _deleteIfExists (weakDdcSdkJsMapPath);
47+ // Simulate missing assets.
48+ sdkFullDillPath = copySdkLayout.fullDillPath;
49+ amdSdkJsPath = copySdkLayout.amdJsPath;
50+ amdSdkJsMapPath = copySdkLayout.amdJsMapPath;
51+ ddcSdkJsPath = copySdkLayout.ddcJsPath;
52+ ddcSdkJsMapPath = copySdkLayout.ddcJsMapPath;
53+
54+ _deleteIfExists (sdkFullDillPath);
55+ _deleteIfExists (amdSdkJsPath);
56+ _deleteIfExists (amdSdkJsMapPath);
57+ _deleteIfExists (ddcSdkJsPath);
58+ _deleteIfExists (ddcSdkJsMapPath);
8159 });
8260
8361 tearDown (() {
@@ -102,30 +80,20 @@ void main() {
10280 expect (configuration.sdkDirectory, equals (sdkDirectory));
10381 expect (configuration.compilerWorkerPath, equals (compilerWorkerPath));
10482
105- expect (sdkLayout.soundSummaryPath, equals (soundSdkSummaryPath));
106- expect (sdkLayout.soundFullDillPath, equals (soundSdkFullDillPath));
107- expect (sdkLayout.soundAmdJsPath, equals (soundAmdSdkJsPath));
108- expect (sdkLayout.soundAmdJsMapPath, equals (soundAmdSdkJsMapPath));
109-
110- expect (sdkLayout.weakSummaryPath, equals (weakSdkSummaryPath));
111- expect (sdkLayout.weakFullDillPath, equals (weakSdkFullDillPath));
112- expect (sdkLayout.weakAmdJsPath, equals (weakAmdSdkJsPath));
113- expect (sdkLayout.weakAmdJsMapPath, equals (weakAmdSdkJsMapPath));
83+ expect (sdkLayout.summaryPath, equals (sdkSummaryPath));
84+ expect (sdkLayout.fullDillPath, equals (sdkFullDillPath));
85+ expect (sdkLayout.amdJsPath, equals (amdSdkJsPath));
86+ expect (sdkLayout.amdJsMapPath, equals (amdSdkJsMapPath));
11487
11588 // Validate that configuration files exist.
11689 configuration.validateSdkDir ();
11790 configuration.validate ();
11891
11992 // Validate all assets exist.
120- expect (sdkLayout.soundSummaryPath, _exists);
121- expect (sdkLayout.soundFullDillPath, _exists);
122- expect (sdkLayout.soundAmdJsPath, _exists);
123- expect (sdkLayout.soundAmdJsMapPath, _exists);
124-
125- expect (sdkLayout.weakSummaryPath, _exists);
126- expect (sdkLayout.weakFullDillPath, _exists);
127- expect (sdkLayout.weakAmdJsPath, _exists);
128- expect (sdkLayout.weakAmdJsMapPath, _exists);
93+ expect (sdkLayout.summaryPath, _exists);
94+ expect (sdkLayout.fullDillPath, _exists);
95+ expect (sdkLayout.amdJsPath, _exists);
96+ expect (sdkLayout.amdJsMapPath, _exists);
12997 });
13098
13199 test (
@@ -146,30 +114,20 @@ void main() {
146114 expect (configuration.sdkDirectory, equals (sdkDirectory));
147115 expect (configuration.compilerWorkerPath, equals (compilerWorkerPath));
148116
149- expect (sdkLayout.soundSummaryPath, equals (soundSdkSummaryPath));
150- expect (sdkLayout.soundFullDillPath, equals (soundSdkFullDillPath));
151- expect (sdkLayout.soundDdcJsPath, equals (soundDdcSdkJsPath));
152- expect (sdkLayout.soundDdcJsMapPath, equals (soundDdcSdkJsMapPath));
153-
154- expect (sdkLayout.weakSummaryPath, equals (weakSdkSummaryPath));
155- expect (sdkLayout.weakFullDillPath, equals (weakSdkFullDillPath));
156- expect (sdkLayout.weakDdcJsPath, equals (weakDdcSdkJsPath));
157- expect (sdkLayout.weakDdcJsMapPath, equals (weakDdcSdkJsMapPath));
117+ expect (sdkLayout.summaryPath, equals (sdkSummaryPath));
118+ expect (sdkLayout.fullDillPath, equals (sdkFullDillPath));
119+ expect (sdkLayout.ddcJsPath, equals (ddcSdkJsPath));
120+ expect (sdkLayout.ddcJsMapPath, equals (ddcSdkJsMapPath));
158121
159122 // Validate that configuration files exist.
160123 configuration.validateSdkDir ();
161124 configuration.validate ();
162125
163126 // Validate all assets exist.
164- expect (sdkLayout.soundSummaryPath, _exists);
165- expect (sdkLayout.soundFullDillPath, _exists);
166- expect (sdkLayout.soundDdcJsPath, _exists);
167- expect (sdkLayout.soundDdcJsMapPath, _exists);
168-
169- expect (sdkLayout.weakSummaryPath, _exists);
170- expect (sdkLayout.weakFullDillPath, _exists);
171- expect (sdkLayout.weakDdcJsPath, _exists);
172- expect (sdkLayout.weakDdcJsMapPath, _exists);
127+ expect (sdkLayout.summaryPath, _exists);
128+ expect (sdkLayout.fullDillPath, _exists);
129+ expect (sdkLayout.ddcJsPath, _exists);
130+ expect (sdkLayout.ddcJsMapPath, _exists);
173131 });
174132
175133 test ('Can generate missing SDK assets with canary features enabled' ,
@@ -184,11 +142,8 @@ void main() {
184142 );
185143 await assetGenerator.generateSdkAssets ();
186144
187- final soundSdk = File (soundAmdSdkJsPath).readAsStringSync ();
188- expect (soundSdk, contains ('canary' ));
189-
190- final weakSdk = File (weakAmdSdkJsPath).readAsStringSync ();
191- expect (weakSdk, contains ('canary' ));
145+ final sdk = File (amdSdkJsPath).readAsStringSync ();
146+ expect (sdk, contains ('canary' ));
192147 });
193148
194149 test (
@@ -204,11 +159,8 @@ void main() {
204159 );
205160 await assetGenerator.generateSdkAssets ();
206161
207- final soundSdk = File (soundDdcSdkJsPath).readAsStringSync ();
208- expect (soundSdk, contains ('canary' ));
209-
210- final weakSdk = File (weakDdcSdkJsPath).readAsStringSync ();
211- expect (weakSdk, contains ('canary' ));
162+ final sdk = File (ddcSdkJsPath).readAsStringSync ();
163+ expect (sdk, contains ('canary' ));
212164 });
213165 });
214166}
0 commit comments