Skip to content

Instantly share code, notes, and snippets.

@AseemWangoo
Created December 20, 2022 06:22
Show Gist options
  • Save AseemWangoo/7debb67194372202206c8f89ded00e8d to your computer and use it in GitHub Desktop.
Save AseemWangoo/7debb67194372202206c8f89ded00e8d to your computer and use it in GitHub Desktop.
test ffigen timezone
test('timezones', () {
final pubspecFile = File('pubspec.yaml');
final pubspecYaml = loadYaml(pubspecFile.readAsStringSync()) as YamlMap;
final config = Config.fromYaml(pubspecYaml['ffigen'] as YamlMap);
final output = parse(config).generate();
expect(output, contains('class TimeZoneLibrary{'));
expect(output, contains('class NSString extends _ObjCWrapper {'));
expect(output, contains('static NSTimeZone? getLocalTimeZone('));
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment