Skip to content

Commit 83b937e

Browse files
committed
refactor new test
1 parent 0ec97c9 commit 83b937e

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pkgs/c_compiler/test/cbuilder/cbuilder_cross_windows_host_test.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ void main() {
4040
};
4141

4242
const dumpbinFileType = {
43-
Packaging.dynamic: 'DLL',
44-
Packaging.static: 'LIBRARY',
43+
LinkMode.dynamic: 'DLL',
44+
LinkMode.static: 'LIBRARY',
4545
};
4646

47-
for (final packaging in Packaging.values) {
47+
for (final linkMode in LinkMode.values) {
4848
for (final target in targets) {
49-
test('Cbuilder $packaging library $target', timeout: Timeout.factor(2),
49+
test('Cbuilder $linkMode library $target', timeout: Timeout.factor(2),
5050
() async {
5151
await inTempDir((tempUri) async {
5252
final addCUri =
@@ -57,9 +57,9 @@ void main() {
5757
outDir: tempUri,
5858
packageRoot: tempUri,
5959
target: target,
60-
packaging: packaging == Packaging.dynamic
61-
? PackagingPreference.dynamic
62-
: PackagingPreference.static,
60+
linkModePreference: linkMode == LinkMode.dynamic
61+
? LinkModePreference.dynamic
62+
: LinkModePreference.static,
6363
);
6464
final buildOutput = BuildOutput();
6565

@@ -75,7 +75,7 @@ void main() {
7575
);
7676

7777
final libUri =
78-
tempUri.resolve(target.os.libraryFileName(name, packaging));
78+
tempUri.resolve(target.os.libraryFileName(name, linkMode));
7979
expect(await File.fromUri(libUri).exists(), true);
8080
final result = await runProcess(
8181
executable: dumpbinUri,
@@ -90,7 +90,7 @@ void main() {
9090
final fileType = result.stdout
9191
.split('\n')
9292
.firstWhere((e) => e.contains('File Type'));
93-
expect(fileType, contains(dumpbinFileType[packaging]));
93+
expect(fileType, contains(dumpbinFileType[linkMode]));
9494
});
9595
});
9696
}

0 commit comments

Comments
 (0)