mirror of https://github.com/apache/maven.git
merge r377583 from branch 2.0.x
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@377591 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e84c6e0e86
commit
51b55e42ff
|
@ -224,6 +224,7 @@ public class DefaultArtifactVersion
|
||||||
majorVersion = null;
|
majorVersion = null;
|
||||||
minorVersion = null;
|
minorVersion = null;
|
||||||
incrementalVersion = null;
|
incrementalVersion = null;
|
||||||
|
buildNumber = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,8 +132,15 @@ public class DefaultArtifactVersionTest
|
||||||
assertEquals( "check minor version", 0, version.getMinorVersion() );
|
assertEquals( "check minor version", 0, version.getMinorVersion() );
|
||||||
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
|
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
|
||||||
assertEquals( "check build number", 1, version.getBuildNumber() );
|
assertEquals( "check build number", 1, version.getBuildNumber() );
|
||||||
assertEquals( "check qualifier", null, version.getQualifier() );
|
assertNull( "check qualifier", version.getQualifier() );
|
||||||
assertEquals( "check string value", "2.0-1", version.toString() );
|
assertEquals( "check string value", "2.0-1", version.toString() );
|
||||||
|
|
||||||
|
version = new DefaultArtifactVersion( "5.0.0alpha-2006020117" );
|
||||||
|
assertEquals( "check major version", 0, version.getMajorVersion() );
|
||||||
|
assertEquals( "check minor version", 0, version.getMinorVersion() );
|
||||||
|
assertEquals( "check incremental version", 0, version.getIncrementalVersion() );
|
||||||
|
assertEquals( "check build number", 0, version.getBuildNumber() );
|
||||||
|
assertEquals( "check qualifier", "5.0.0alpha-2006020117", version.getQualifier() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testVersionComparing()
|
public void testVersionComparing()
|
||||||
|
@ -145,7 +152,7 @@ public class DefaultArtifactVersionTest
|
||||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "2" ) ) < 0 );
|
assertTrue( version.compareTo( new DefaultArtifactVersion( "2" ) ) < 0 );
|
||||||
|
|
||||||
version = new DefaultArtifactVersion( "1" );
|
version = new DefaultArtifactVersion( "1" );
|
||||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "1" ) ) == 0 );
|
assertEquals( 0, version.compareTo( new DefaultArtifactVersion( "1" ) ) );
|
||||||
|
|
||||||
version = new DefaultArtifactVersion( "2" );
|
version = new DefaultArtifactVersion( "2" );
|
||||||
assertTrue( version.compareTo( new DefaultArtifactVersion( "1" ) ) > 0 );
|
assertTrue( version.compareTo( new DefaultArtifactVersion( "1" ) ) > 0 );
|
||||||
|
|
Loading…
Reference in New Issue