ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r949849 - /ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/version/VersionRangeMatcherTest.java
Date Mon, 31 May 2010 19:48:33 GMT
Author: maartenc
Date: Mon May 31 19:48:33 2010
New Revision: 949849

URL: http://svn.apache.org/viewvc?rev=949849&view=rev
Log:
Improved code style (thanks to Carl Quinn)

Modified:
    ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/version/VersionRangeMatcherTest.java

Modified: ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/version/VersionRangeMatcherTest.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/version/VersionRangeMatcherTest.java?rev=949849&r1=949848&r2=949849&view=diff
==============================================================================
--- ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/version/VersionRangeMatcherTest.java
(original)
+++ ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/version/VersionRangeMatcherTest.java
Mon May 31 19:48:33 2010
@@ -23,24 +23,21 @@ import org.apache.ivy.core.module.id.Mod
 import org.apache.ivy.plugins.latest.LatestRevisionStrategy;
 
 public class VersionRangeMatcherTest extends TestCase {
-    VersionMatcher _vm = new VersionRangeMatcher("range", new LatestRevisionStrategy());
+    VersionMatcher vm = new VersionRangeMatcher("range", new LatestRevisionStrategy());
 
-    public VersionRangeMatcherTest() {
-    }
-    
     public void testMavenExcludeParenthesis() throws Exception {
         assertAccept("[3.8,4.0)", "3.7", false);
         assertAccept("[3.8,4.0)", "3.8", true);
         assertAccept("[3.8,4.0)", "3.9", true);
         assertAccept("[3.8,4.0)", "4.0", false);
         assertAccept("[3.8,4.0)", "4.1", false);
-        
+
         assertAccept("(3.8,4.0]", "3.7", false);
         assertAccept("(3.8,4.0]", "3.8", false);
         assertAccept("(3.8,4.0]", "3.9", true);
         assertAccept("(3.8,4.0]", "4.0", true);
         assertAccept("(3.8,4.0]", "4.1", false);
-        
+
         assertAccept("(3.8,4.0)", "3.7", false);
         assertAccept("(3.8,4.0)", "3.8", false);
         assertAccept("(3.8,4.0)", "3.9", true);
@@ -131,7 +128,7 @@ public class VersionRangeMatcherTest ext
         assertAccept("(,2.0]", "2.0", true);
 
         assertAccept("(,2.0]", "2.3", false);
-        
+
         assertAccept("[1.0, )", "1.1", true);
         assertAccept("[1.0 ,)", "2.0", true);
         assertAccept("[1.0 , )", "3.5.6", true);
@@ -157,11 +154,11 @@ public class VersionRangeMatcherTest ext
     // assertion helper methods
 
     private void assertDynamic(String askedVersion, boolean b) {
-        assertEquals(b, _vm.isDynamic(ModuleRevisionId.newInstance("org", "name", askedVersion)));
+        assertEquals(b, vm.isDynamic(ModuleRevisionId.newInstance("org", "name", askedVersion)));
     }
 
     private void assertAccept(String askedVersion, String depVersion, boolean b) {
-        assertEquals(b, _vm.accept(ModuleRevisionId.newInstance("org", "name", askedVersion),
+        assertEquals(b, vm.accept(ModuleRevisionId.newInstance("org", "name", askedVersion),
             ModuleRevisionId.newInstance("org", "name", depVersion)));
     }
 }



Mime
View raw message