File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 44
55import 'dart:io' ;
66
7- import 'package:ffigen/src/code_generator/library.dart' ;
8- import 'package:ffigen/src/config_provider/config.dart' ;
97import 'package:ffigen/src/header_parser.dart' ;
10- import 'package:logging/logging.dart' ;
118import 'package:path/path.dart' as path;
129import 'package:test/test.dart' ;
1310
@@ -32,7 +29,7 @@ void main() {
3229 // yaml code. To support concurrent tests, we can't set Directory.current.
3330 // As a workaround, add an extra '-I' option that uses the absolute path.
3431 generator.headers.compilerOptions! .add (
35- '-I${path .join (packagePathForTests , 'third_party/libclang/include' )}'
32+ '-I${path .join (packagePathForTests , 'third_party/libclang/include' )}' ,
3633 );
3734
3835 final context = testContext (generator);
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import 'dart:ffi';
66import 'dart:io' ;
77import 'dart:math' ;
88
9- import 'package:ffigen/ffigen.dart' ;
109import 'package:ffigen/src/header_parser.dart' show parse;
1110import 'package:path/path.dart' as path;
1211import 'package:test/test.dart' ;
Original file line number Diff line number Diff line change @@ -21,9 +21,8 @@ $ dart run test/setup.dart && dart run test/regen.dart && dart test
2121
2222void _regenConfig (Logger logger, String yamlConfigPath) {
2323 final path = p.join (packagePathForTests, yamlConfigPath);
24- withChDir (path, () {
25- testConfigFromPath (path).generate (logger: logger);
26- });
24+ Directory .current = File (path).parent;
25+ testConfigFromPath (path).generate (logger: logger);
2726}
2827
2928Future <void > main (List <String > args) async {
You can’t perform that action at this time.
0 commit comments