예제 #1
0
 @Test
 public void testGreaterMajorMinor() {
   ZendServerVersion v = ZendServerVersion.byName("7.0");
   assertEquals(1, v.compareTo(ZendServerVersion.v6_0_0));
   assertEquals(1, v.compareTo(ZendServerVersion.v6_0_X));
   assertEquals(1, v.compareTo(ZendServerVersion.v6_X_X));
 }
예제 #2
0
 @Test
 public void testEqualMajorBuild() {
   ZendServerVersion v = ZendServerVersion.byName("6.0.7");
   assertEquals(1, v.compareTo(ZendServerVersion.v6_0_0));
   assertEquals(0, v.compareTo(ZendServerVersion.v6_0_X));
   assertEquals(0, v.compareTo(ZendServerVersion.v6_X_X));
 }
예제 #3
0
 @Test
 public void testLessMajorMinor() {
   ZendServerVersion v = ZendServerVersion.byName("5.0");
   assertEquals(-1, v.compareTo(ZendServerVersion.v6_0_0));
   assertEquals(-1, v.compareTo(ZendServerVersion.v6_0_X));
   assertEquals(-1, v.compareTo(ZendServerVersion.v6_X_X));
 }
예제 #4
0
 @Test
 public void testEqualFull() {
   ZendServerVersion v = ZendServerVersion.byName("6.0.0");
   assertEquals(0, v.compareTo(ZendServerVersion.v6_0_0));
   assertEquals(0, v.compareTo(ZendServerVersion.v6_0_X));
   assertEquals(0, v.compareTo(ZendServerVersion.v6_X_X));
 }