aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1235095 [5/5] - in /aries/trunk/versioning: ./ versioning-checker/ versioning-checker/src/main/java/org/apache/aries/versioning/check/ versioning-checker/src/main/java/org/apache/aries/versioning/utils/ versioning-checker/src/test/java/org...
Date Tue, 24 Jan 2012 00:53:26 GMT
Modified: aries/trunk/versioning/versioning-checker/src/test/java/org/apache/aries/versioning/tests/SemanticVersionUtilsTest.java
URL: http://svn.apache.org/viewvc/aries/trunk/versioning/versioning-checker/src/test/java/org/apache/aries/versioning/tests/SemanticVersionUtilsTest.java?rev=1235095&r1=1235094&r2=1235095&view=diff
==============================================================================
--- aries/trunk/versioning/versioning-checker/src/test/java/org/apache/aries/versioning/tests/SemanticVersionUtilsTest.java
(original)
+++ aries/trunk/versioning/versioning-checker/src/test/java/org/apache/aries/versioning/tests/SemanticVersionUtilsTest.java
Tue Jan 24 00:53:25 2012
@@ -1,84 +1,80 @@
-
-
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements.  See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership.  The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License.  You may obtain a copy of the License at
+*
+*   http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied.  See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
 package org.apache.aries.versioning.tests;
+
 import static org.junit.Assert.assertEquals;
 
 import org.apache.aries.versioning.utils.SemanticVersioningUtils;
 import org.junit.Test;
 
 
+public class SemanticVersionUtilsTest {
+
+    @Test
+    public void testMethodTransform() {
+
+
+        String returnStr = SemanticVersioningUtils.getReadableMethodSignature("getAccountNum",
"(Ljava/lang/String;)Ljava/lang/String;");
+        String expectedStr = "method java.lang.String getAccountNum(java.lang.String)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("handleNotification",
"(Ljavax/management/Notification;Ljava/lang/Object;)V");
+        expectedStr = "method void handleNotification(javax.management.Notification, java.lang.Object)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("addItemDeepCopy",
"(Lcom/xml/xci/Cursor$Area;Lcom/xml/xci/Cursor;Lcom/xml/xci/Cursor$Profile;Lcom/xml/xci/Cursor$Profile;ZZZ)Lcom/xml/xci/Cursor;");
+        expectedStr = "method com.xml.xci.Cursor addItemDeepCopy(com.xml.xci.Cursor$Area,
com.xml.xci.Cursor, com.xml.xci.Cursor$Profile, com.xml.xci.Cursor$Profile, boolean, boolean,
boolean)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("createParserAndCompiler",
"(Ljavax/xml/transform/Source;Lcom/xltxe/rnm1/xtq/exec/XTQStaticContext;Lcom/xltxe/rnm1/xtq/common/utils/ErrorHandler;)Lcom/xltxe/rnm1/xtq/xquery/drivers/XQueryCompiler;");
+        expectedStr = "method com.xltxe.rnm1.xtq.xquery.drivers.XQueryCompiler createParserAndCompiler(javax.xml.transform.Source,
com.xltxe.rnm1.xtq.exec.XTQStaticContext, com.xltxe.rnm1.xtq.common.utils.ErrorHandler)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("getAxis", "()Lcom/xml/xci/exec/Axis;");
+        expectedStr = "method com.xml.xci.exec.Axis getAxis()";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("createEmpty", "()Lcom/xml/xci/dp/cache/dom/InternalNodeData;");
+        expectedStr = "method com.xml.xci.dp.cache.dom.InternalNodeData createEmpty()";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("addElement", "(Lorg/w3c/dom/Node;)V");
+        expectedStr = "method void addElement(org.w3c.dom.Node)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("isExternalFunctionCall",
"(Lcom/xltxe/rnm1/xtq/ast/nodes/FunctionCall;Lcom/xltxe/rnm1/xtq/xpath/drivers/XPathCompiler;)Z");
+        expectedStr = "method boolean isExternalFunctionCall(com.xltxe.rnm1.xtq.ast.nodes.FunctionCall,
com.xltxe.rnm1.xtq.xpath.drivers.XPathCompiler)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
+
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("wrapForTracing",
"(Lcom/xltxe/rnm1/xtq/xslt/runtime/output/ResultTreeSequenceWriterStream$TraceOutputEventGenerator;Lcom/xml/xci/SessionContext;Lcom/xml/xci/Cursor;Lcom/xml/xci/RequestInfo;Lcom/xltxe/rnm1/xtq/xslt/runtime/output/ResultTreeSequenceWriterStream$DeferredTraceResultTreeSequenceWriterStream;)Lcom/xml/xci/Cursor;");
+        expectedStr = "method com.xml.xci.Cursor wrapForTracing(com.xltxe.rnm1.xtq.xslt.runtime.output.ResultTreeSequenceWriterStream$TraceOutputEventGenerator,
com.xml.xci.SessionContext, com.xml.xci.Cursor, com.xml.xci.RequestInfo, com.xltxe.rnm1.xtq.xslt.runtime.output.ResultTreeSequenceWriterStream$DeferredTraceResultTreeSequenceWriterStream)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
+
 
-public class SemanticVersionUtilsTest
-{
+        returnStr = SemanticVersioningUtils.getReadableMethodSignature("<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/security/Key;Ljava/security/Key;Ljava/security/cert/Certificate;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IJJLjava/lang/String;)V");
+        expectedStr = "constructor with parameter list (java.lang.String, java.lang.String,
java.lang.String, java.security.Key, java.security.Key, java.security.cert.Certificate, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, int, long, long, java.lang.String)";
+        assertEquals("The return str is incorrect.", expectedStr, returnStr);
 
-  @Test
-  public void testMethodTransform() {
-   
-    
-    String returnStr = SemanticVersioningUtils.getReadableMethodSignature( "getAccountNum",
"(Ljava/lang/String;)Ljava/lang/String;");
-    String expectedStr = "method java.lang.String getAccountNum(java.lang.String)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature( "handleNotification",
"(Ljavax/management/Notification;Ljava/lang/Object;)V");
-    expectedStr = "method void handleNotification(javax.management.Notification, java.lang.Object)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("addItemDeepCopy", "(Lcom/xml/xci/Cursor$Area;Lcom/xml/xci/Cursor;Lcom/xml/xci/Cursor$Profile;Lcom/xml/xci/Cursor$Profile;ZZZ)Lcom/xml/xci/Cursor;");
-    expectedStr = "method com.xml.xci.Cursor addItemDeepCopy(com.xml.xci.Cursor$Area, com.xml.xci.Cursor,
com.xml.xci.Cursor$Profile, com.xml.xci.Cursor$Profile, boolean, boolean, boolean)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("createParserAndCompiler",
"(Ljavax/xml/transform/Source;Lcom/xltxe/rnm1/xtq/exec/XTQStaticContext;Lcom/xltxe/rnm1/xtq/common/utils/ErrorHandler;)Lcom/xltxe/rnm1/xtq/xquery/drivers/XQueryCompiler;");
-    expectedStr = "method com.xltxe.rnm1.xtq.xquery.drivers.XQueryCompiler createParserAndCompiler(javax.xml.transform.Source,
com.xltxe.rnm1.xtq.exec.XTQStaticContext, com.xltxe.rnm1.xtq.common.utils.ErrorHandler)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("getAxis", "()Lcom/xml/xci/exec/Axis;");
-    expectedStr = "method com.xml.xci.exec.Axis getAxis()";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    
-  
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("createEmpty", "()Lcom/xml/xci/dp/cache/dom/InternalNodeData;");
-    expectedStr = "method com.xml.xci.dp.cache.dom.InternalNodeData createEmpty()";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("addElement", "(Lorg/w3c/dom/Node;)V");
-    expectedStr = "method void addElement(org.w3c.dom.Node)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-  
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("isExternalFunctionCall",
"(Lcom/xltxe/rnm1/xtq/ast/nodes/FunctionCall;Lcom/xltxe/rnm1/xtq/xpath/drivers/XPathCompiler;)Z");
-    expectedStr = "method boolean isExternalFunctionCall(com.xltxe.rnm1.xtq.ast.nodes.FunctionCall,
com.xltxe.rnm1.xtq.xpath.drivers.XPathCompiler)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("wrapForTracing", "(Lcom/xltxe/rnm1/xtq/xslt/runtime/output/ResultTreeSequenceWriterStream$TraceOutputEventGenerator;Lcom/xml/xci/SessionContext;Lcom/xml/xci/Cursor;Lcom/xml/xci/RequestInfo;Lcom/xltxe/rnm1/xtq/xslt/runtime/output/ResultTreeSequenceWriterStream$DeferredTraceResultTreeSequenceWriterStream;)Lcom/xml/xci/Cursor;");
-    expectedStr = "method com.xml.xci.Cursor wrapForTracing(com.xltxe.rnm1.xtq.xslt.runtime.output.ResultTreeSequenceWriterStream$TraceOutputEventGenerator,
com.xml.xci.SessionContext, com.xml.xci.Cursor, com.xml.xci.RequestInfo, com.xltxe.rnm1.xtq.xslt.runtime.output.ResultTreeSequenceWriterStream$DeferredTraceResultTreeSequenceWriterStream)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-    
-    returnStr = SemanticVersioningUtils.getReadableMethodSignature("<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/security/Key;Ljava/security/Key;Ljava/security/cert/Certificate;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IJJLjava/lang/String;)V");
-    expectedStr = "constructor with parameter list (java.lang.String, java.lang.String, java.lang.String,
java.security.Key, java.security.Key, java.security.cert.Certificate, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String,
java.lang.String, java.lang.String, int, long, long, java.lang.String)";
-    assertEquals("The return str is incorrect.", expectedStr, returnStr);
-    
-  }
+    }
 }

Modified: aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestA.java
URL: http://svn.apache.org/viewvc/aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestA.java?rev=1235095&r1=1235094&r2=1235095&view=diff
==============================================================================
--- aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestA.java
(original)
+++ aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestA.java
Tue Jan 24 00:53:25 2012
@@ -17,13 +17,16 @@
  * under the License.
  */
 package versioning.java.files;
+
 public class TestA extends TestC implements TestB {
-  public String bar = "bar";
-  protected static int c =2;
-  public String getFoo() {
-    return String.valueOf(bar);
-  }
-  public int getBarLen(String bar) {
-    return bar.length();
-  }
+    public String bar = "bar";
+    protected static int c = 2;
+
+    public String getFoo() {
+        return String.valueOf(bar);
+    }
+
+    public int getBarLen(String bar) {
+        return bar.length();
+    }
 }
\ No newline at end of file

Modified: aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestB.java
URL: http://svn.apache.org/viewvc/aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestB.java?rev=1235095&r1=1235094&r2=1235095&view=diff
==============================================================================
--- aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestB.java
(original)
+++ aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestB.java
Tue Jan 24 00:53:25 2012
@@ -17,8 +17,10 @@
  * under the License.
  */
 package versioning.java.files;
-public interface TestB{
-  int bar = 2;
-  public String getFoo();
-  
+
+public interface TestB {
+    int bar = 2;
+
+    public String getFoo();
+
 }
\ No newline at end of file

Modified: aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestBChild.java
URL: http://svn.apache.org/viewvc/aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestBChild.java?rev=1235095&r1=1235094&r2=1235095&view=diff
==============================================================================
--- aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestBChild.java
(original)
+++ aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestBChild.java
Tue Jan 24 00:53:25 2012
@@ -17,7 +17,8 @@
  * under the License.
  */
 package versioning.java.files;
-public interface TestBChild extends TestB{
-  public String getBar();
-  
+
+public interface TestBChild extends TestB {
+    public String getBar();
+
 }
\ No newline at end of file

Modified: aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestC.java
URL: http://svn.apache.org/viewvc/aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestC.java?rev=1235095&r1=1235094&r2=1235095&view=diff
==============================================================================
--- aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestC.java
(original)
+++ aries/trunk/versioning/versioning-checker/src/test/java/versioning/java/files/TestC.java
Tue Jan 24 00:53:25 2012
@@ -18,15 +18,15 @@
  */
 package versioning.java.files;
 
-public class TestC 
-{
+public class TestC {
 
-  protected int c = 1;
-  protected int getFooLen(String foo) {
-    return foo.length();
-  }
-  
-  public int getBooLen(String boo) {
-    return boo.length();
-  }
+    protected int c = 1;
+
+    protected int getFooLen(String foo) {
+        return foo.length();
+    }
+
+    public int getBooLen(String boo) {
+        return boo.length();
+    }
 }



Mime
View raw message