dart-sdk/tests/ffi/coordinate_nnbd_workaround.dart
Daco Harkes 7fbbe4fca3 [vm/ffi] Migrate off .addressOf in tests
Removes invocations of `.addressOf` in tests.

Removes the constructor from the Coordinate testing class which
has become useless with no access to the underlying pointer.

Removes the bare variant of Coordinate because it is identical to the
non-bare variant.

Issue: https://github.com/dart-lang/sdk/issues/40667

Change-Id: Ie26fa3a9cac38e794e93f5fadfec2562a814c1ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181403
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-01-28 21:40:15 +00:00

24 lines
631 B
Dart

// Copyright (c) 2020, 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 getters/setters in structs rather than fields.
library FfiTest;
import 'dart:ffi';
/// Sample struct for dart:ffi library.
class Coordinate extends Struct {
@Double()
external double get x;
external set x(double v);
@Double()
external double get y;
external set y(double v);
external Pointer<Coordinate> get next;
external set next(Pointer<Coordinate> v);
}