[tests/ffi] Remove unused import

Change-Id: I0772d0146dd7faaed3e51ef4357fac096d23cce3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332681
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
This commit is contained in:
Daco Harkes 2023-10-30 11:25:51 +00:00 committed by Commit Queue
parent 8c55f3eb0b
commit 7aace2b6da

View file

@ -6,8 +6,7 @@
import 'dart:ffi';
import "package:expect/expect.dart";
import "package:ffi/ffi.dart";
import 'package:expect/expect.dart';
import 'dylib_utils.dart';
@ -40,19 +39,19 @@ final class Struct9Uint8 extends Struct {
external int a8;
String toString() =>
"(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})";
'(${a0}, ${a1}, ${a2}, ${a3}, ${a4}, ${a5}, ${a6}, ${a7}, ${a8})';
}
void main() {
final ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions");
final ffiTestFunctions = dlopenPlatformSpecific('ffi_test_functions');
final alloc = ffiTestFunctions.lookupFunction<
Pointer<Struct9Uint8> Function(),
Pointer<Struct9Uint8> Function()>("AllocStruct9Uint8");
Pointer<Struct9Uint8> Function()>('AllocStruct9Uint8');
final sum = ffiTestFunctions.lookupFunction<Int64 Function(Struct9Uint8),
int Function(Struct9Uint8)>("SumStruct9Uint8");
int Function(Struct9Uint8)>('SumStruct9Uint8');
final free = ffiTestFunctions.lookupFunction<
Void Function(Pointer<Struct9Uint8>),
void Function(Pointer<Struct9Uint8>)>("FreeStruct9Uint8");
void Function(Pointer<Struct9Uint8>)>('FreeStruct9Uint8');
final array = alloc();
Struct9Uint8 s9 = array[64 * 1024 - 1]; // At the end of a page.