Repository navigation
Conversation
Test262 conformance changesVM implementation
Fixed tests (328): |
Codecov Report
@@ Coverage Diff @@
## main #2267 +/- ##
==========================================
+ Coverage 41.30% 41.40% +0.09%
==========================================
Files 234 237 +3
Lines 22018 22218 +200
==========================================
+ Hits 9095 9199 +104
- Misses 12923 13019 +96
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
raskad
left a comment
There was a problem hiding this comment.
I left some ideas and nitpicks.
The DC00—DFFF range seem to be surrogates, but I'm not sure where exactly we miss something here.
I think switching to ranges in the reserved sets is probably a good idea, but not that imporant. We could always do that later.
Really nice to get these functions done, great work :)
|
The failing tests are probably related to the abstract operation It was probably changed between spec editions, but the intent seems to be the same: rejecting URIs with unpaired surrogates. Having said that, fixing that test is probably blocked by #1659 |
I'm checking this, the issue might be with the |
It turns out that the issue is in the I guess that not using Rust string as the backend storage would solve this (and many other issues). So we should try to implement the full UTF-16 support. |
raskad
left a comment
There was a problem hiding this comment.
Great work. Nice addition of the documentation to the codepoints functions!
jedel1043
left a comment
There was a problem hiding this comment.
The implementation looks good!
|
bors r+ |
This Pull Request closes #894. It changes the following: - Adds the `encodeURI()`, `decodeURI()`, `encodeURIComponent()` and `decodeURIComponent()` functions - Passes all the tests except for those depending on #1987 or on the comment below. Things to discuss: - I'm unable to find in the spec information regarding the only failing tests, which relate to [this](https://github.com/tc39/test262/blob/f1870753fa616261193b99f79d996889921b3404/test/built-ins/encodeURI/S15.1.3.3_A1.1_T2.js): > If string.charAt(k) in [0xDC00 - 0xDFFF], throw URIError Let me know your thoughts :) Co-authored-by: raskad <[email protected]>
|
Pull request successfully merged into main. Build succeeded: |
This Pull Request closes #894.
It changes the following:
encodeURI(),decodeURI(),encodeURIComponent()anddecodeURIComponent()functionsThings to discuss:
Let me know your thoughts :)