blob: 5ae23e22b5a69a9c32ff2e56dab31373a0e01186 [file] [log] [blame]
// Copyright (c) 2022, 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.
/// @assertion @override
/// String toString()
/// override
/// A string representation of this ABI.
///
// The string is equal to the 'on' part from Platform.version and dart --version
///
/// @description Checks that this method returns a string which is equal to the
/// 'on' part from Platform.version
/// @author sgrekhov@unipro.ru
import "dart:ffi";
import 'dart:io';
import "../../../Utils/expect.dart";
main() {
final abi = Abi.current();
String expected = Platform.version
.substring(Platform.version.indexOf(" on ") + 4)
.trim()
.replaceAll("\"", "");
Expect.equals(expected, abi.toString());
}