-
Notifications
You must be signed in to change notification settings - Fork 17
Add RevString from Base #22
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
Conversation
test/runtests.jl
Outdated
s = convert(String, string(prefix, c, suffix)) | ||
s = RevString(s) | ||
r = reverse(s) | ||
ri = search(r, c) |
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.
Should also check that @test r == RevString(s)
(and not overwrite s
with the reversed string).
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.
I hadn't really noticed how weird this code is...
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.
r
isn't the same as RevString(s)
, since s
was redefined as the RevString
of itself, so reverse(s)
should then be the original s
from before it was RevString
'd.
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.
Yes but since the original s
is lost, you can't check that the result is correct...
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.
These tests should be pretty much entirely rewritten.
2820e80
to
36d8564
Compare
Nightly failure is unrelated. |
Part of JuliaLang/julia#22611