From 8741bd9ea1a43228f33ba454adc0709ef8f9dbe0 Mon Sep 17 00:00:00 2001 From: hneemann Date: Thu, 23 Feb 2017 15:25:14 +0100 Subject: [PATCH] moved some examples to distribution --- distribution/Assembly.xml | 7 +++ .../dig/test/fet => main/dig/cmos}/and.dig | 58 ++++++++++-------- .../test/fet => main/dig/cmos}/inverter.dig | 60 ++++++++++--------- .../fet => main/dig/cmos}/openDrainOut.dig | 0 .../fet => main/dig/cmos}/tristateout.dig | 6 +- .../digital/integration/TestExamples.java | 8 +-- 6 files changed, 80 insertions(+), 59 deletions(-) rename src/{test/resources/dig/test/fet => main/dig/cmos}/and.dig (90%) rename src/{test/resources/dig/test/fet => main/dig/cmos}/inverter.dig (66%) rename src/{test/resources/dig/test/fet => main/dig/cmos}/openDrainOut.dig (100%) rename src/{test/resources/dig/test/fet => main/dig/cmos}/tristateout.dig (100%) diff --git a/distribution/Assembly.xml b/distribution/Assembly.xml index 8d1815513..0b2f145a7 100644 --- a/distribution/Assembly.xml +++ b/distribution/Assembly.xml @@ -67,6 +67,13 @@ *.dig + + ${basedir}/src/main/dig/cmos + /examples/cmos/ + + *.dig + + ${basedir}/src/main/dig/test /examples/test/ diff --git a/src/test/resources/dig/test/fet/and.dig b/src/main/dig/cmos/and.dig similarity index 90% rename from src/test/resources/dig/test/fet/and.dig rename to src/main/dig/cmos/and.dig index 9e2567d0d..c51aaf084 100644 --- a/src/test/resources/dig/test/fet/and.dig +++ b/src/main/dig/cmos/and.dig @@ -15,7 +15,7 @@ A - + Out @@ -82,7 +82,7 @@ B - + NFET @@ -126,6 +126,14 @@ + + + + + + + + @@ -135,15 +143,15 @@ - + - + - + @@ -155,8 +163,8 @@ - - + + @@ -167,8 +175,8 @@ - - + + @@ -182,14 +190,6 @@ - - - - - - - - @@ -206,14 +206,6 @@ - - - - - - - - @@ -222,6 +214,22 @@ + + + + + + + + + + + + + + + + diff --git a/src/test/resources/dig/test/fet/inverter.dig b/src/main/dig/cmos/inverter.dig similarity index 66% rename from src/test/resources/dig/test/fet/inverter.dig rename to src/main/dig/cmos/inverter.dig index e8623229b..ea3a03360 100644 --- a/src/test/resources/dig/test/fet/inverter.dig +++ b/src/main/dig/cmos/inverter.dig @@ -5,7 +5,7 @@ VDD - + In @@ -14,12 +14,8 @@ Label A - - isHighZ - true - - + Out @@ -29,22 +25,32 @@ Y - + NFET - - + + + Label + T2 + + + PFET - - + + + Label + T1 + + + Ground - + Testcase @@ -59,49 +65,49 @@ Z Z - + - + - + - - + + - - + + - + - + - - + + - + - - + + - + \ No newline at end of file diff --git a/src/test/resources/dig/test/fet/openDrainOut.dig b/src/main/dig/cmos/openDrainOut.dig similarity index 100% rename from src/test/resources/dig/test/fet/openDrainOut.dig rename to src/main/dig/cmos/openDrainOut.dig diff --git a/src/test/resources/dig/test/fet/tristateout.dig b/src/main/dig/cmos/tristateout.dig similarity index 100% rename from src/test/resources/dig/test/fet/tristateout.dig rename to src/main/dig/cmos/tristateout.dig index a7d02d728..e297409cd 100644 --- a/src/test/resources/dig/test/fet/tristateout.dig +++ b/src/main/dig/cmos/tristateout.dig @@ -7,7 +7,7 @@ Label - T6 + T4 @@ -17,7 +17,7 @@ Label - T5 + T6 @@ -27,7 +27,7 @@ Label - T4 + T5 diff --git a/src/test/java/de/neemann/digital/integration/TestExamples.java b/src/test/java/de/neemann/digital/integration/TestExamples.java index 0fc9690d9..1a4b0acc9 100644 --- a/src/test/java/de/neemann/digital/integration/TestExamples.java +++ b/src/test/java/de/neemann/digital/integration/TestExamples.java @@ -28,8 +28,8 @@ public class TestExamples extends TestCase { */ public void testDistExamples() throws Exception { File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig"); - assertEquals(94, new FileScanner(this::check).scan(examples)); - assertEquals(46, testCasesInFiles); + assertEquals(98, new FileScanner(this::check).scan(examples)); + assertEquals(50, testCasesInFiles); } /** @@ -39,8 +39,8 @@ public class TestExamples extends TestCase { */ public void testTestExamples() throws Exception { File examples = new File(Resources.getRoot(), "/dig/test"); - assertEquals(45, new FileScanner(this::check).scan(examples)); - assertEquals(35, testCasesInFiles); + assertEquals(41, new FileScanner(this::check).scan(examples)); + assertEquals(31, testCasesInFiles); }