File tree 3 files changed +5
-5
lines changed
native_assets_builder/test_data/dart_app/bin
native_assets_cli/example/use_dart_api/test
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 58
58
- uses : nttld/setup-ndk@6a7e9c5494a25c4842ca1011f710300132eacd94
59
59
with :
60
60
ndk-version : r26b
61
- if : ${{ matrix.sdk == 'stable' }}
61
+ if : ${{ matrix.sdk == 'stable' && matrix.os != 'macos' }}
62
62
63
63
- run : dart pub get
64
64
Original file line number Diff line number Diff line change @@ -13,15 +13,15 @@ void main() {
13
13
void testNativeAdd () {
14
14
final answer = add (5 , 6 );
15
15
if (answer != 5 + 6 ) {
16
- throw 'Wrong answer' ;
16
+ throw Exception ( 'Wrong answer' ) ;
17
17
}
18
18
print ('add(5, 6) = $answer ' );
19
19
}
20
20
21
21
void testNativeSubtract () {
22
22
final answer = subtract (5 , 6 );
23
23
if (answer != 5 - 6 ) {
24
- throw 'Wrong answer' ;
24
+ throw Exception ( 'Wrong answer' ) ;
25
25
}
26
26
print ('subtract(5, 6) = $answer ' );
27
27
}
Original file line number Diff line number Diff line change 4
4
5
5
import 'dart:ffi' ;
6
6
7
- import 'package:use_dart_api/use_dart_api.dart' ;
8
7
import 'package:test/test.dart' ;
8
+ import 'package:use_dart_api/use_dart_api.dart' ;
9
9
10
10
void main () {
11
11
InitDartApiDL (NativeApi .initializeApiDLData);
12
12
13
13
test ('use dart_api_dl.h' , () {
14
- const int x = 42 ;
14
+ const x = 42 ;
15
15
final persistentHandle = NewPersistentHandle (x);
16
16
HandleFromPersistent (persistentHandle);
17
17
});
You can’t perform that action at this time.
0 commit comments