Skip to content

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

Merged
merged 2 commits into from
Dec 5, 2017
Merged

Add RevString from Base #22

merged 2 commits into from
Dec 5, 2017

Conversation

ararslan
Copy link
Member

@ararslan ararslan commented Sep 7, 2017

test/runtests.jl Outdated
s = convert(String, string(prefix, c, suffix))
s = RevString(s)
r = reverse(s)
ri = search(r, c)
Copy link
Member

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).

Copy link
Member Author

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...

Copy link
Member Author

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.

Copy link
Member

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...

Copy link
Member Author

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.

@ararslan
Copy link
Member Author

ararslan commented Dec 5, 2017

Nightly failure is unrelated.

@ararslan ararslan merged commit b4f7df5 into master Dec 5, 2017
@ararslan ararslan deleted the aa/revstring branch December 5, 2017 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants