Files
sdk/tests/ffi/enable_ffi_test.dart
T
Samir Jindel f4e63990cb [vm/ffi] Support FFI on ARM32.
Fixes dartbug.com/36311.
Addresses dartbug.com/35760.

Change-Id: Ib6c4db69f31dfb5317e4162b80d3e30a996e3a2e
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-release-arm-try,vm-ffi-android-product-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97631
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-04-10 13:15:16 +00:00

21 lines
719 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.
//
// Dart test program for testing the --enable-ffi=false flag.
//
// VMOptions=--enable-ffi=false
library FfiTest;
import 'dart:ffi' as ffi; //# 01: compile-time error
import "package:expect/expect.dart";
void main() {
ffi.Pointer<ffi.Int64> p = ffi.allocate(); //# 01: compile-time error, runtime error
p.store(42); //# 01: compile-time error, runtime error
Expect.equals(42, p.load<int>()); //# 01: compile-time error, runtime error
p.free(); //# 01: compile-time error, runtime error
}