Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Sep 27, 2024
1 parent 57d3073 commit d25863b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions pkgs/ffigen/test/native_objc_test/block_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,7 @@ void main() {
expect(result1.z, 7.8);
expect(result1.w, 1.2);

final result2Ptr = arena<Vec4>();
final result2 = result2Ptr.ref;
BlockTester.callVec4Block_(result2Ptr, block);
final result2 = BlockTester.callVec4Block_(block);
expect(result2.x, 3.4);
expect(result2.y, 5.6);
expect(result2.z, 7.8);
Expand Down
5 changes: 1 addition & 4 deletions pkgs/ffigen/test/native_objc_test/property_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,14 @@ void main() {
input.z = 5.6;
input.w = 7.8;

final resultPtr = calloc<Vec4>();
final result = resultPtr.ref;
testInstance.structProperty = input;
testInstance.getStructProperty(resultPtr);
final result = testInstance.structProperty;
expect(result.x, 1.2);
expect(result.y, 3.4);
expect(result.z, 5.6);
expect(result.w, 7.8);

calloc.free(inputPtr);
calloc.free(resultPtr);
});

test('Floats', () {
Expand Down

0 comments on commit d25863b

Please sign in to comment.