mirror of https://github.com/apache/maven.git
Add some more unit tests for version comparisons:
x.y.z-alphanumeric < x.y.z < x.y.z-numeric and x.y.z-A < x.y.z-B where A is before B in the alphabeth. This was triggered by a user question on the dev list, and took unit tests to answer the question - committing as 'documentation'. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@414014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46487ceb4f
commit
7ba2f9fe2e
|
@ -237,5 +237,17 @@ public class DefaultArtifactVersionTest
|
|||
|
||||
version = new DefaultArtifactVersion( "2.0-1" );
|
||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "2.0.1" ) ) < 0 );
|
||||
|
||||
version = new DefaultArtifactVersion( "2.0.1-klm" );
|
||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "2.0.1-lmn" ) ) < 0 );
|
||||
|
||||
version = new DefaultArtifactVersion( "2.0.1-xyz" );
|
||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "2.0.1" ) ) < 0 );
|
||||
|
||||
version = new DefaultArtifactVersion( "2.0.1" );
|
||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "2.0.1-123" ) ) < 0 );
|
||||
|
||||
version = new DefaultArtifactVersion( "2.0.1-xyz" );
|
||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "2.0.1-123" ) ) < 0 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue