-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use at-testset in unicode tests. #20445
Conversation
Yes, the things inside testsets are typically indented one level. |
@test string(Char(0x110000)) == "\ufffd" | ||
@test convert(String, b"this is a test\xed\x80\x80") == "this is a test\ud000" | ||
@testset "string indexing" begin | ||
let str = String(b"this is a test\xed\x80") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The let
actually isn't necessary now that it's in a testset
, since str
is scoped within the testset
. Not that you need to change it, just letting you know. Doesn't hurt to keep the let
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, of course... too used to using let
s in tests, so didn't even notice it. I can remove it if it's preferred.
test/unicode/utf8proc.jl
Outdated
asymbol = ['(',')', '~', '$' ] | ||
usymbol = ['∪', '∩', '⊂', '⊃', '√', '€', '¥', '↰', '△', '§'] | ||
for c in alphas | ||
@test isalpha(c) == true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indented too far
test/unicode/utf8proc.jl
Outdated
@test_throws ArgumentError normalize_string("\u006e\u0303", compose=false, stripmark=true) | ||
end | ||
|
||
@testset "fastplus" begin# Make sure fastplus is called for coverage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space between begin
and #
test/unicode/UnicodeError.jl
Outdated
@@ -1,7 +1,8 @@ | |||
# This file is a part of Julia. License is MIT: https://julialang.org/license | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leave the first blank line here, it's significant to the license-headers script
test/unicode/utf8.jl
Outdated
@@ -1,43 +1,48 @@ | |||
# This file is a part of Julia. License is MIT: https://julialang.org/license | |||
|
|||
## Test for CESU-8 sequences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can remove the comment if the testset description makes it completely redundant
test/unicode/utf8proc.jl
Outdated
|
||
@testset "#issue #5939" begin # uft8proc character predicates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may as well have both the description and the issue number in the testset label
test/unicode/utf8proc.jl
Outdated
|
||
#issue #5939 uft8proc character predicates | ||
let | ||
@testset "uft8proc character predicates #5939" begin # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for the trailing #
if there isn't a comment any more
test/unicode/utf8proc.jl
Outdated
show(io, g) | ||
check = "length-14 GraphemeIterator{String} for \"$str\"" | ||
@test String(take!(io)) == check | ||
@testset "#3721, #6939" begin # up-to-date character widths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put comment wording in testset description here and on L276
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ofc... is there generally no limit to testset name lengths?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they probably don't need to be multi-line, but otherwise not really
closes #18829
Is indentation usually changed? git footprint is smaller like this,but I can change it. Sanity check of names is welcome.
edit: btw, speaking of footprint: is there any reason why this is not just one
test/unicode.jl
file ?