mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-25 07:57:12 -07:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
720e32aa07
1 changed files with 8 additions and 0 deletions
|
@ -4,6 +4,7 @@ import com.beust.kobalt.misc.StringVersion
|
|||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.annotations.DataProvider
|
||||
import org.testng.annotations.Test
|
||||
import java.util.*
|
||||
|
||||
|
||||
/**
|
||||
|
@ -53,4 +54,11 @@ class StringVersionTest {
|
|||
assertThat(sv2).isGreaterThan(sv1)
|
||||
assertThat(sv1).isNotEqualTo(sv2)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sortVersions() {
|
||||
val versions = listOf("1", "1.2", "0.9", "1.1", "1.1.1", "1.0.2").map(::StringVersion)
|
||||
Collections.sort(versions)
|
||||
assertThat(versions.map { it.version }).isEqualTo(listOf("0.9", "1", "1.0.2", "1.1", "1.1.1", "1.2"))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue