Skip to content

Commit

Permalink
[native_*] Use skips that don't rely on package:test (#1450)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes authored Aug 26, 2024
1 parent 96f7fb0 commit 2020264
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
11 changes: 7 additions & 4 deletions pkgs/native_assets_builder/test/build_runner/link_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:native_assets_cli/native_assets_cli.dart' as cli;
import 'package:native_assets_cli/src/api/asset.dart';
import 'package:test/test.dart';
Expand Down Expand Up @@ -150,6 +152,11 @@ void main() async {
});
});

if (Platform.isMacOS || Platform.isWindows) {
// https://github.com/dart-lang/native/issues/1376.
return;
}

test(
'treeshaking assets using CLinker',
timeout: longTimeout,
Expand Down Expand Up @@ -185,10 +192,6 @@ void main() async {
expect(linkResult.assets.first, isA<NativeCodeAsset>());
});
},
onPlatform: {
'mac-os': const Skip('https://github.com/dart-lang/native/issues/1376.'),
'windows': const Skip('https://github.com/dart-lang/native/issues/1376.'),
},
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ import 'package:test/test.dart';
import '../helpers.dart';

void main() async {
if (Platform.isWindows) {
// TODO(https://github.com/dart-lang/native/issues/1415): Enable support
// for Windows once linker flags are supported by CBuilder.
return;
}

late Uri tempUri;
const name = 'native_dynamic_linking';

Expand Down
10 changes: 7 additions & 3 deletions pkgs/native_toolchain_c/test/clinker/throws_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:io';

import 'package:native_assets_cli/native_assets_cli.dart';
import 'package:native_toolchain_c/native_toolchain_c.dart';
import 'package:test/test.dart';
Expand All @@ -10,6 +12,11 @@ import '../helpers.dart';

Future<void> main() async {
for (final os in OS.values) {
if (Platform.isLinux) {
// Is implemented.
continue;
}

test(
'throws on some platforms',
() async {
Expand Down Expand Up @@ -37,9 +44,6 @@ Future<void> main() async {
throwsUnsupportedError,
);
},
onPlatform: {
'linux': const Skip('Is implemented'),
},
);
}
}

0 comments on commit 2020264

Please sign in to comment.