mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-17 17:04:42 -04:00
fixed a bug in the splitter, which ocures if definition is invalid
This commit is contained in:
parent
4b54430a17
commit
d24b991bed
@ -89,13 +89,11 @@ public class PortsTest extends TestCase {
|
||||
}
|
||||
|
||||
public void testInputConsistency3() throws Exception {
|
||||
Splitter.Ports p = new Splitter.Ports("4-7,4-4");
|
||||
try {
|
||||
p = new Splitter.Ports("4-7,4-3");
|
||||
fail();
|
||||
} catch (NodeException e) {
|
||||
assertTrue(true);
|
||||
}
|
||||
Splitter.Ports p = new Splitter.Ports("7-4,4-4");
|
||||
assertEquals(4, p.getPort(0).getPos());
|
||||
assertEquals(4, p.getPort(0).getBits());
|
||||
assertEquals(4, p.getPort(1).getPos());
|
||||
assertEquals(1, p.getPort(1).getBits());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user