diff --git a/src/test/java/de/neemann/digital/integration/TestExamples.java b/src/test/java/de/neemann/digital/integration/TestExamples.java index cb368b500..02bac18a6 100644 --- a/src/test/java/de/neemann/digital/integration/TestExamples.java +++ b/src/test/java/de/neemann/digital/integration/TestExamples.java @@ -39,8 +39,8 @@ public class TestExamples extends TestCase { */ public void testTestExamples() throws Exception { File examples = new File(Resources.getRoot(), "/dig/test"); - assertEquals(43, new FileScanner(this::check).scan(examples)); - assertEquals(35, testCasesInFiles); + assertEquals(45, new FileScanner(this::check).scan(examples)); + assertEquals(37, testCasesInFiles); } diff --git a/src/test/resources/dig/test/switch/switch_pull.dig b/src/test/resources/dig/test/switch/switch_pull.dig new file mode 100644 index 000000000..07d0c5028 --- /dev/null +++ b/src/test/resources/dig/test/switch/switch_pull.dig @@ -0,0 +1,519 @@ + + + 1 + + + Relay + + + + + In + + + Label + A + + + + + + PullUp + + + + + Out + + + Label + Y1 + + + + + + Ground + + + + + Relay + + + + + Out + + + Label + Y2 + + + + + + Ground + + + + + PullDown + + + + + Relay + + + + + PullUp + + + + + Out + + + Label + Y3 + + + + + + Relay + + + + + Out + + + Label + Y4 + + + + + + PullDown + + + + + VDD + + + + + VDD + + + + + Testcase + + + Testdata + + A Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 +0 1 0 1 0 1 0 1 0 +1 0 0 1 1 0 0 1 1 +0 1 0 1 0 1 0 1 0 +1 0 0 1 1 0 0 1 1 + + + + + + + + Relay + + + rotation + + + + + + + PullUp + + + + + Out + + + Label + Y5 + + + + + + Ground + + + + + Relay + + + rotation + + + + + + + Out + + + Label + Y6 + + + + + + Ground + + + + + PullDown + + + + + Relay + + + rotation + + + + + + + PullUp + + + + + Out + + + Label + Y7 + + + + + + Relay + + + rotation + + + + + + + Out + + + Label + Y8 + + + + + + PullDown + + + + + VDD + + + + + VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/resources/dig/test/switch/switch_simple.dig b/src/test/resources/dig/test/switch/switch_simple.dig new file mode 100644 index 000000000..fdc4bcf0d --- /dev/null +++ b/src/test/resources/dig/test/switch/switch_simple.dig @@ -0,0 +1,415 @@ + + + 1 + + + Relay + + + + + In + + + Label + A + + + + + + Out + + + Label + Y1 + + + + + + Ground + + + + + Relay + + + + + Out + + + Label + Y2 + + + + + + Ground + + + + + Relay + + + + + Out + + + Label + Y3 + + + + + + Relay + + + + + Out + + + Label + Y4 + + + + + + VDD + + + + + VDD + + + + + Testcase + + + Testdata + + A Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 +0 z z z z z z z z +1 0 0 1 1 0 0 1 1 +0 z z z z z z z z +1 0 0 1 1 0 0 1 1 + + + + + + + + Relay + + + rotation + + + + + + + Out + + + Label + Y5 + + + + + + Ground + + + + + Relay + + + rotation + + + + + + + Out + + + Label + Y6 + + + + + + Ground + + + + + Relay + + + rotation + + + + + + + Out + + + Label + Y7 + + + + + + Relay + + + rotation + + + + + + + Out + + + Label + Y8 + + + + + + VDD + + + + + VDD + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file