Skip to content

Commit

Permalink
Still debugging coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Apr 17, 2024
1 parent 68dc3d1 commit baa1f8b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 32 deletions.
44 changes: 22 additions & 22 deletions pkgs/ffigen/test/native_objc_test/string_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@ void main() {
generateBindingsForCoverage('string');
});

for (final s in ['Hello', '🇵🇬', 'Embedded\u0000Null']) {
test('NSString to/from Dart string [$s]', () {
final ns1 = NSString(s);
expect(ns1.length, s.length);
expect(ns1.toString().length, s.length);
expect(ns1.toString(), s);

final ns2 = s.toNSString();
expect(ns2.length, s.length);
expect(ns2.toString().length, s.length);
expect(ns2.toString(), s);
});
}

test('strings usable', () {
final str1 = 'Hello'.toNSString();
final str2 = 'World!'.toNSString();

final str3 = StringUtil.strConcat_with_(str1, str2);
expect(str3.length, 11);
expect(str3.toString(), "HelloWorld!");
});
// for (final s in ['Hello', '🇵🇬', 'Embedded\u0000Null']) {
// test('NSString to/from Dart string [$s]', () {
// final ns1 = NSString(s);
// expect(ns1.length, s.length);
// expect(ns1.toString().length, s.length);
// expect(ns1.toString(), s);

// final ns2 = s.toNSString();
// expect(ns2.length, s.length);
// expect(ns2.toString().length, s.length);
// expect(ns2.toString(), s);
// });
// }

// test('strings usable', () {
// final str1 = 'Hello'.toNSString();
// final str2 = 'World!'.toNSString();

// final str3 = StringUtil.strConcat_with_(str1, str2);
// expect(str3.length, 11);
// expect(str3.toString(), "HelloWorld!");
// });
});
}

This file was deleted.

5 changes: 0 additions & 5 deletions pkgs/objective_c/test/generate_code_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import 'package:test/test.dart';

import '../tool/generate_code.dart' as generate_code;

// ignore_for_file: avoid_relative_lib_imports
import '../lib/src/dummy_file_for_verifying_coverage_is_working.dart';

void main() {
group('generate_code.dart', () {
test('Runs without exception', () async {
Expand All @@ -35,8 +32,6 @@ void main() {
expect(objcBindings, contains('class NSObject'));
expect(objcBindings, contains('class NSString'));
expect(objcBindings, contains('factory NSString(String str)'));

foo();
});
});
}

0 comments on commit baa1f8b

Please sign in to comment.