Skip to content
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

SemVer, a class to sort version strings #1323

Merged
merged 1 commit into from Dec 20, 2019
Merged

Conversation

@swankjesse
Copy link
Member

swankjesse commented Dec 18, 2019

No description provided.

@swankjesse

This comment has been minimized.

Copy link
Member Author

swankjesse commented Dec 18, 2019

}
}

typealias SegmentComparator = (String, String) -> Int

This comment has been minimized.

Copy link
@JakeWharton

JakeWharton Dec 18, 2019

Collaborator

internal or private

This comment has been minimized.

Copy link
@swankjesse

swankjesse Dec 20, 2019

Author Member

Fixed.

val aLimit = a.find(SEPARATORS, startIndex = aPos, endIndex = aSize)
val bLimit = b.find(SEPARATORS, startIndex = bPos, endIndex = bSize)

val result = comparator(

This comment has been minimized.

Copy link
@JakeWharton

JakeWharton Dec 18, 2019

Collaborator

What's this do? I would expect a call to compareTo.

This comment has been minimized.

Copy link
@swankjesse

swankjesse Dec 20, 2019

Author Member

I’m inadvertently using a lambda instead of a proper comparator. lemme roll that back.

@jrodbx
jrodbx approved these changes Dec 18, 2019
Copy link
Member

oldergod left a comment

I guess it's the kind of stuff which are potentially dependent enough to live in their own module/repo.

import org.junit.Assert.fail
import org.junit.Test

internal class SemVerTest {

This comment has been minimized.

Copy link
@oldergod

oldergod Dec 18, 2019

Member

easy to read test, super nice

@swankjesse swankjesse force-pushed the jwilson.1217.versions branch from 53220c2 to e129726 Dec 20, 2019
@swankjesse swankjesse merged commit 579ee3e into master Dec 20, 2019
0 of 2 checks passed
0 of 2 checks passed
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@oldergod oldergod deleted the jwilson.1217.versions branch Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.