Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
liamappelbe committed Sep 29, 2023
1 parent 65a2ca7 commit 15ebe89
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions test/native_objc_test/typedef_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// Objective C support is only available on mac.

@TestOn('mac-os')

import 'dart:ffi';
import 'dart:io';

import 'package:test/test.dart';
import '../test_utils.dart';
import 'typedef_bindings.dart';
import 'util.dart';

void main() {
late TypedefTestObjCLibrary lib;

group('typedef', () {
setUpAll(() {
logWarnings();
final dylib = File('test/native_objc_test/typedef_test.dylib');
verifySetupFile(dylib);
lib = TypedefTestObjCLibrary(DynamicLibrary.open(dylib.absolute.path));
generateBindingsForCoverage('typedef');
});

test('Regression test for #386', () {
// https://github.com/dart-lang/ffigen/issues/386
// Make sure that the typedef SomeClassPtr_dart is for SomeClass.
final SomeClassPtr_dart instance = SomeClass.new1(lib);
expect(instance.pointer, isNot(nullptr));
});
});
}

0 comments on commit 15ebe89

Please sign in to comment.