Skip to content

Conversation

@ararslan
Copy link
Member

@ararslan ararslan commented Sep 7, 2017

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.

4 participants