dart-sdk/tests/ffi/ffi_test_helpers.dart
Samir Jindel 43382ded6d [vm/ffi] Regression test for dartbug.com/37133
Also removed some redundant test code.

Change-Id: Idbb343d35592816814d473de2317324029481c6f
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-mac-debug-x64-try,vm-kernel-reload-mac-debug-simdbc64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105590
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-06-17 10:47:00 +00:00

16 lines
616 B
Dart

// 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");