From 703e93d9ed0f15e7458dee3c7ac361bdce833420 Mon Sep 17 00:00:00 2001 From: sgrekhov Date: Fri, 9 Feb 2024 10:37:11 +0200 Subject: [PATCH] #2529. Fix failing API core tests --- LibTest/core/DateTime/parse_A01_t03.dart | 4 +++- .../stackTrace_A01_t01.dart | 8 ++----- .../stackTrace_A01_t02.dart | 24 ------------------- .../core/Uri/Uri.dataFromBytes_A01_t02.dart | 4 ++-- .../UriData/UriData.fromBytes_A01_t02.dart | 4 ++-- 5 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 LibTest/core/StackOverflowError/stackTrace_A01_t02.dart diff --git a/LibTest/core/DateTime/parse_A01_t03.dart b/LibTest/core/DateTime/parse_A01_t03.dart index db75100146..322c574b06 100644 --- a/LibTest/core/DateTime/parse_A01_t03.dart +++ b/LibTest/core/DateTime/parse_A01_t03.dart @@ -19,7 +19,9 @@ check(String str, int year, int month, int day, int hours, int minutes, Expect.equals(minutes, d.minute); Expect.equals(seconds, d.second); Expect.equals(milliseconds, d.millisecond); - Expect.equals(microseconds, d.microsecond); + if (!isJS) { // microseconds are not supported on Web + Expect.equals(microseconds, d.microsecond); + } } main() { diff --git a/LibTest/core/StackOverflowError/stackTrace_A01_t01.dart b/LibTest/core/StackOverflowError/stackTrace_A01_t01.dart index bc200a81de..347c3f8529 100644 --- a/LibTest/core/StackOverflowError/stackTrace_A01_t01.dart +++ b/LibTest/core/StackOverflowError/stackTrace_A01_t01.dart @@ -3,7 +3,8 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion StackTrace stackTrace -/// @description Checks that this property is not null if error is thrown +/// @description Checks that this property is not null for the newly created +/// instance /// @author sgrekhov@unipro.ru /// @issue 28179 @@ -12,9 +13,4 @@ import "../../../Utils/expect.dart"; main() { Error e = new StackOverflowError(); Expect.isNull(e.stackTrace); - try { - throw e; - } on StackOverflowError catch (er) { - Expect.isNotNull(e.stackTrace); - } } diff --git a/LibTest/core/StackOverflowError/stackTrace_A01_t02.dart b/LibTest/core/StackOverflowError/stackTrace_A01_t02.dart deleted file mode 100644 index 4f1d2d31d2..0000000000 --- a/LibTest/core/StackOverflowError/stackTrace_A01_t02.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) 2016, 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 StackTrace stackTrace -/// @description Checks that this property is not null if error is thrown -/// @author sgrekhov@unipro.ru -/// @issue 28179 - -import "../../../Utils/expect.dart"; - -f() { - f(); -} - -main() { - Error e = new StackOverflowError(); - Expect.isNull(e.stackTrace); - try { - f(); - } on StackOverflowError catch (er) { - Expect.isNotNull(e.stackTrace); - } -} diff --git a/LibTest/core/Uri/Uri.dataFromBytes_A01_t02.dart b/LibTest/core/Uri/Uri.dataFromBytes_A01_t02.dart index a6eb06725a..73623a26e9 100644 --- a/LibTest/core/Uri/Uri.dataFromBytes_A01_t02.dart +++ b/LibTest/core/Uri/Uri.dataFromBytes_A01_t02.dart @@ -51,6 +51,6 @@ main() { check(l, "image/gif"); check(l, "text/plain"); check(l, "Text/Plain"); - check(l, "Avada / Kedavra"); - check(l, "Абра / Кадабра"); + check(l, "avada / kedavra"); + check(l, "абра / кадабра"); } diff --git a/LibTest/core/UriData/UriData.fromBytes_A01_t02.dart b/LibTest/core/UriData/UriData.fromBytes_A01_t02.dart index 2f7426aeda..5283688fa8 100644 --- a/LibTest/core/UriData/UriData.fromBytes_A01_t02.dart +++ b/LibTest/core/UriData/UriData.fromBytes_A01_t02.dart @@ -34,6 +34,6 @@ main() { check(l, "image/gif"); check(l, "text/plain"); check(l, "Text/Plain"); - check(l, "Avada / Kedavra"); - check(l, "Абра / Кадабра"); + check(l, "avada / kedavra"); + check(l, "абра / кадабра"); }