add expectLength()
authorAdam Megacz <adam.megacz@sun.com>
Tue, 24 Mar 2009 18:20:50 +0000 (18:20 +0000)
committerAdam Megacz <adam.megacz@sun.com>
Tue, 24 Mar 2009 18:20:50 +0000 (18:20 +0000)
testCode/com/sun/vlsi/chips/marina/test/MarinaUtils.java

index 100d20d..b8b4646 100644 (file)
@@ -53,4 +53,9 @@ public class MarinaUtils {
         return berkBits;
     }
 
+
+    public static void expectLength(BitVector bv, int expected) {
+        if (bv.getNumBits()!=expected)
+            throw new RuntimeException("expected BitVector of length " + expected + ", but got " + bv.getNumBits() +" in " + bv);
+    }
 }
\ No newline at end of file