From 8a04ea0e83090edf58b35b4a0e78b4e683202f1b Mon Sep 17 00:00:00 2001 From: hneemann Date: Fri, 23 Jun 2017 21:30:51 +0200 Subject: [PATCH] added a 6 transistor xor test case --- .../digital/integration/TestExamples.java | 4 +- src/test/resources/dig/test/fet/xor2.dig | 265 ++++++++++++++++++ 2 files changed, 267 insertions(+), 2 deletions(-) create mode 100644 src/test/resources/dig/test/fet/xor2.dig diff --git a/src/test/java/de/neemann/digital/integration/TestExamples.java b/src/test/java/de/neemann/digital/integration/TestExamples.java index 20aad58fd..d67b726c9 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(77, new FileScanner(this::check).scan(examples)); - assertEquals(71, testCasesInFiles); + assertEquals(78, new FileScanner(this::check).scan(examples)); + assertEquals(72, testCasesInFiles); } diff --git a/src/test/resources/dig/test/fet/xor2.dig b/src/test/resources/dig/test/fet/xor2.dig new file mode 100644 index 000000000..7c7aad4d3 --- /dev/null +++ b/src/test/resources/dig/test/fet/xor2.dig @@ -0,0 +1,265 @@ + + + 1 + + + + In + + + Label + B + + + + + + PFET + + + + + NFET + + + unidirectional + true + + + + + + Out + + + rotation + + + + Label + Y + + + + + + TransGate + + + rotation + + + + + + + In + + + Label + A + + + + + + PFET + + + + + NFET + + + + + Ground + + + + + VDD + + + + + Testcase + + + Testdata + + A B Y +0 0 0 +0 1 1 +1 0 1 +1 1 0 + + + +# transitions +0 0 0 +0 1 1 +0 0 0 +1 0 1 +0 0 0 +1 1 0 +0 0 0 +0 1 1 +1 0 1 +0 1 1 +1 1 0 +0 1 1 +1 0 1 +1 1 0 +1 0 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file