Skip to content

Commit

Permalink
Fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes committed Oct 3, 2023
1 parent 81b3bd1 commit 5a29bca
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import '../helpers.dart';

void main() async {
late Uri tempUri;
const name = 'native_add_library';

setUp(() async {
tempUri = (await Directory.systemTemp.createTemp()).uri;
Expand All @@ -31,14 +32,15 @@ void main() async {
test('native_add build$testSuffix', () async {
final testTempUri = tempUri.resolve('test1/');
await Directory.fromUri(testTempUri).create();
final testPackageUri = packageUri.resolve('example/native_add_library/');
final testPackageUri = packageUri.resolve('example/$name/');
final dartUri = Uri.file(Platform.resolvedExecutable);

final processResult = await Process.run(
dartUri.toFilePath(),
[
'build.dart',
'-Dout_dir=${tempUri.toFilePath()}',
'-Dpackage_name=$name',
'-Dpackage_root=${testPackageUri.toFilePath()}',
'-Dtarget_os=${OS.current}',
'-Dversion=${BuildConfig.version}',
Expand Down Expand Up @@ -80,7 +82,7 @@ void main() async {
expect(
dependencies.dependencies,
[
testPackageUri.resolve('src/native_add_library.c'),
testPackageUri.resolve('src/$name.c'),
testPackageUri.resolve('build.dart'),
],
);
Expand Down

0 comments on commit 5a29bca

Please sign in to comment.