Skip to content

Commit

Permalink
Add a basic test for FixedBitSet.setBits
Browse files Browse the repository at this point in the history
More to follow.
  • Loading branch information
lupino3 committed May 22, 2016
1 parent 32c9455 commit c27faff
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@
<test name="org.edumips64.CpuTests">
<formatter type="plain" usefile="false"/>
</test>
<test name="org.edumips64.core.FixedBitSetTest">
<formatter type="plain" usefile="false"/>
</test>
</junit>
<delete dir="${outputDir}" />
</target>
Expand Down
19 changes: 19 additions & 0 deletions test/org/edumips64/core/FixedBitSetTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.edumips64.core;

import org.edumips64.utils.IrregularStringOfBitsException;
import org.junit.Test;

import static org.junit.Assert.*;

/**
* Tests the methods of FixedBitSet. Since it is an abstract base class,
* the methods are tested through BitSet64.
*/
public class FixedBitSetTest {
private BitSet64 bitset = new BitSet64();

@Test(expected = IrregularStringOfBitsException.class)
public void testIrregularStringOfBits() throws Exception {
bitset.setBits("blah", 0);
}
}

0 comments on commit c27faff

Please sign in to comment.