blob: 5d14d4ad8c983fdc4d655c4051c75824991f7c5b [file] [log] [blame]
// Copyright (c) 2019, 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.
//
// Helpers for tests which trigger GC in delicate places.
import 'dart:ffi' as ffi;
import 'dylib_utils.dart';
typedef NativeNullaryOp = ffi.Void Function();
typedef NullaryOpVoid = void Function();
final ffi.DynamicLibrary ffiTestFunctions =
dlopenPlatformSpecific("ffi_test_functions");
final triggerGc = ffiTestFunctions
.lookupFunction<NativeNullaryOp, NullaryOpVoid>("TriggerGC");