Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/ada-url/ada into dependabot…
Browse files Browse the repository at this point in the history
…/github_actions/github/codeql-action-3.25.11
  • Loading branch information
CarlosEduR committed Jul 3, 2024
2 parents fade9ba + 71dc9ee commit 99f3ae6
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 10 deletions.
25 changes: 15 additions & 10 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -271,20 +271,25 @@ if(RUST_FOUND)
# Important: we want to build in release mode!
corrosion_import_crate(MANIFEST_PATH "competitors/servo-url/Cargo.toml" NO_LINKER_OVERRIDE PROFILE release)

target_link_libraries(bench PRIVATE servo-url)
target_compile_definitions(bench PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")
# Check if servo-url target was created successfully
if(TARGET servo-url)
target_link_libraries(bench PRIVATE servo-url)
target_compile_definitions(bench PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")

target_link_libraries(benchdata PRIVATE servo-url)
target_compile_definitions(benchdata PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")
target_link_libraries(benchdata PRIVATE servo-url)
target_compile_definitions(benchdata PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")

target_link_libraries(bbc_bench PRIVATE servo-url)
target_compile_definitions(bbc_bench PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")
target_link_libraries(bbc_bench PRIVATE servo-url)
target_compile_definitions(bbc_bench PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")

target_link_libraries(percent_encode PRIVATE servo-url)
target_compile_definitions(percent_encode PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")
target_link_libraries(percent_encode PRIVATE servo-url)
target_compile_definitions(percent_encode PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")

target_link_libraries(wpt_bench PRIVATE servo-url)
target_compile_definitions(wpt_bench PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")
target_link_libraries(wpt_bench PRIVATE servo-url)
target_compile_definitions(wpt_bench PRIVATE ADA_RUST_VERSION="${Rust_VERSION}")
else()
message(WARNING "servo-url target was not created. Skipping linking benchmarks and servo-url.")
endif()
else()
message(STATUS "Rust/Cargo is unavailable." )
message(STATUS "We will not benchmark servo-url." )
Expand Down
26 changes: 26 additions & 0 deletions tests/wpt/toascii.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,31 @@
{
"input": "",
"output": "xn--hdh"
},
{
"comment": "NFC normalization (forbidden < and > characters are normalized to valid ones)",
"input": "=\u0338",
"output": "xn--1ch"
},
{
"input": "<\u0338",
"output": "xn--gdh"
},
{
"input": ">\u0338",
"output": "xn--hdh"
},
{
"comment": "Same with inserted IDNA ignored code point",
"input": "=\u00AD\u0338",
"output": "xn--1ch"
},
{
"input": "<\u00AD\u0338",
"output": "xn--gdh"
},
{
"input": ">\u00AD\u0338",
"output": "xn--hdh"
}
]

0 comments on commit 99f3ae6

Please sign in to comment.