154c324786
Addresses https://github.com/dart-lang/sdk/issues/36334 Change-Id: I880812941748207ea93a789db2f2d4d2938d3f37 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97961 Commit-Queue: Samir Jindel <sjindel@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com> Auto-Submit: Samir Jindel <sjindel@google.com>
26 lines
705 B
Dart
26 lines
705 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 that structs are locked out on 32-bit platforms.
|
|
|
|
library FfiTest;
|
|
|
|
import 'dart:ffi' as ffi;
|
|
|
|
import "package:expect/expect.dart";
|
|
|
|
@ffi.struct
|
|
class C extends ffi.Pointer<ffi.Void> {
|
|
@ffi.IntPtr()
|
|
int x;
|
|
external static int sizeOf();
|
|
}
|
|
|
|
void main() {
|
|
final C c = ffi.fromAddress<C>(1);
|
|
Expect.throws<UnimplementedError>(() => c.x);
|
|
Expect.throws<UnimplementedError>(() => c.x = 0);
|
|
Expect.throws<UnimplementedError>(() => C.sizeOf());
|
|
}
|