/*
- * Copyright 2007 Google Inc.
+ * Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package com.google.zxing.common;
-import junit.framework.TestCase;
+import org.junit.Assert;
+import org.junit.Test;
/**
- * @author srowen@google.com (Sean Owen)
+ * @author Sean Owen
*/
-public final class BitArrayTestCase extends TestCase {
+public final class BitArrayTestCase extends Assert {
+ @Test
public void testGetSet() {
BitArray array = new BitArray(33);
for (int i = 0; i < 33; i++) {
}
}
+ @Test
public void testSetBulk() {
BitArray array = new BitArray(64);
array.setBulk(32, 0xFFFF0000);
}
}
+ @Test
public void testClear() {
BitArray array = new BitArray(32);
for (int i = 0; i < 32; i++) {
}
}
+ @Test
public void testGetArray() {
BitArray array = new BitArray(64);
array.set(0);
assertEquals(Integer.MIN_VALUE, ints[1]);
}
+ @Test
public void testIsRange() {
BitArray array = new BitArray(64);
assertTrue(array.isRange(0, 64, false));