gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject svn commit: r1363559 - /gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java
Date Thu, 19 Jul 2012 21:48:33 GMT
Author: lewismc
Date: Thu Jul 19 21:48:33 2012
New Revision: 1363559

URL: http://svn.apache.org/viewvc?rev=1363559&view=rev
Log:
trivial commit, duplicate test for ListGenericArray.compareTo()

Modified:
    gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java?rev=1363559&r1=1363558&r2=1363559&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java
(original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/persistency/TestListGenericArray.java
Thu Jul 19 21:48:33 2012
@@ -19,6 +19,7 @@
 package org.apache.gora.persistency;
 
 import org.apache.avro.Schema; 
+import org.apache.avro.generic.GenericData;
 import org.apache.avro.util.Utf8;
 import org.apache.gora.persistency.ListGenericArray; 
 import org.junit.Assert;
@@ -42,4 +43,17 @@ public class TestListGenericArray {
     }
     Assert.assertFalse(stackOverflowError);
   }
+  
+  @Test
+  public void testCompareTo() {
+    ListGenericArray array = new ListGenericArray(Schema.create(Schema.Type.STRING));
+    boolean stackOverflowError = false;
+    array.add(new Utf8("array comparison test"));
+    try {
+      int compareTo = array.compareTo(array);
+    } catch (StackOverflowError e) {
+      stackOverflowError = true;
+    }
+    Assert.assertFalse(stackOverflowError);
+  }
 }



Mime
View raw message