Skip to content

Commit

Permalink
Update WPT: modify URL.canParse tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rmisev committed Oct 16, 2023
1 parent f9e5e21 commit 9ad31a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/test-url.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,21 +202,21 @@ TEST_CASE("url::can_parse") {
// https://github.com/web-platform-tests/wpt/pull/39069
CHECK_FALSE(upa::url::can_parse("undefined", nullptr));

CHECK(upa::url::can_parse("a:b", nullptr));
CHECK_FALSE(upa::url::can_parse("undefined", "a:b"));
CHECK(upa::url::can_parse("aaa:b", nullptr));
CHECK_FALSE(upa::url::can_parse("undefined", "aaa:b"));

CHECK(upa::url::can_parse("a:/b", nullptr));
CHECK(upa::url::can_parse("undefined", "a:/b"));
CHECK(upa::url::can_parse("aaa:/b", nullptr));
CHECK(upa::url::can_parse("undefined", "aaa:/b"));

CHECK_FALSE(upa::url::can_parse("https://test:test", nullptr));
CHECK(upa::url::can_parse("a", "https://b/"));
}

SUBCASE("Additional tests") {
const upa::url base("a:b");
const upa::url base("aaa:b");

CHECK_FALSE(upa::url::can_parse("undefined", base));
CHECK(upa::url::can_parse("a:/b", base));
CHECK(upa::url::can_parse("aaa:/b", base));
}
}

Expand Down

0 comments on commit 9ad31a0

Please sign in to comment.