Files
sdk/tests/ffi/abi_test.dart
Ryan Macnak 530fff90c0 [vm, simarm64] Handle exceptions during FFI callbacks.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/60204
Change-Id: If746fe07a10c9c71d228ca9591f398054635fea2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/413900
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-03-10 10:14:15 -07:00

27 lines
752 B
Dart

// Copyright (c) 2021, 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.
import 'dart:ffi';
import 'dart:io';
import 'package:expect/expect.dart';
void main() {
testCurrent();
testPlatformVersionCompatibility();
}
void testCurrent() {
final currentAbi = Abi.current();
Expect.isTrue(Abi.values.contains(currentAbi));
}
void testPlatformVersionCompatibility() {
final abiStringFromPlatformVersion = Platform.version
.split('"')[1]
.replaceAll("sim", "");
final abiStringFromCurrent = Abi.current().toString();
Expect.equals(abiStringFromPlatformVersion, abiStringFromCurrent);
}