mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-28 15:32:40 -04:00
improved tests in PAL and PLA
This commit is contained in:
parent
67d57653c4
commit
9f079883a6
@ -311,11 +311,11 @@ werden.</string>
|
|||||||
<entry>
|
<entry>
|
||||||
<string>Testdata</string>
|
<string>Testdata</string>
|
||||||
<testData>
|
<testData>
|
||||||
<dataString>A B Y_0
|
<dataString>A B C Y_0
|
||||||
0 0 0
|
0 0 x 0
|
||||||
0 1 1
|
0 1 x 1
|
||||||
1 0 1
|
1 0 x 1
|
||||||
1 1 0
|
1 1 x 0
|
||||||
</dataString>
|
</dataString>
|
||||||
</testData>
|
</testData>
|
||||||
</entry>
|
</entry>
|
||||||
@ -536,11 +536,11 @@ werden.</string>
|
|||||||
<entry>
|
<entry>
|
||||||
<string>Testdata</string>
|
<string>Testdata</string>
|
||||||
<testData>
|
<testData>
|
||||||
<dataString>A B Y_1
|
<dataString>A B C Y_1
|
||||||
0 0 1
|
0 0 x 1
|
||||||
0 1 0
|
0 1 x 0
|
||||||
1 0 0
|
1 0 x 0
|
||||||
1 1 1
|
1 1 x 1
|
||||||
</dataString>
|
</dataString>
|
||||||
</testData>
|
</testData>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -434,36 +434,25 @@ werden.</string>
|
|||||||
<visualElement>
|
<visualElement>
|
||||||
<elementName>Testcase</elementName>
|
<elementName>Testcase</elementName>
|
||||||
<elementAttributes>
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>Y_3 = A or C</string>
|
||||||
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<string>Testdata</string>
|
<string>Testdata</string>
|
||||||
<testData>
|
<testData>
|
||||||
<dataString># y_0 = A xor B
|
<dataString># y_3 = A or C
|
||||||
# y_1 = C and D
|
|
||||||
# y_2 = A or (C and D)
|
|
||||||
# y_3 = A or C
|
|
||||||
|
|
||||||
A B C D Y_0 Y_1 Y_2 Y_3
|
A B C D Y_3
|
||||||
0 0 0 0 0 0 0 0
|
0 x 0 x 0
|
||||||
0 0 0 1 0 0 0 0
|
0 x 1 x 1
|
||||||
0 0 1 0 0 0 0 1
|
1 x 0 x 1
|
||||||
0 0 1 1 0 1 1 1
|
1 x 1 x 1
|
||||||
0 1 0 0 1 0 0 0
|
|
||||||
0 1 0 1 1 0 0 0
|
|
||||||
0 1 1 0 1 0 0 1
|
|
||||||
0 1 1 1 1 1 1 1
|
|
||||||
1 0 0 0 1 0 1 1
|
|
||||||
1 0 0 1 1 0 1 1
|
|
||||||
1 0 1 0 1 0 1 1
|
|
||||||
1 0 1 1 1 1 1 1
|
|
||||||
1 1 0 0 0 0 1 1
|
|
||||||
1 1 0 1 0 0 1 1
|
|
||||||
1 1 1 0 0 0 1 1
|
|
||||||
1 1 1 1 0 1 1 1
|
|
||||||
</dataString>
|
</dataString>
|
||||||
</testData>
|
</testData>
|
||||||
</entry>
|
</entry>
|
||||||
</elementAttributes>
|
</elementAttributes>
|
||||||
<pos x="860" y="760"/>
|
<pos x="780" y="820"/>
|
||||||
</visualElement>
|
</visualElement>
|
||||||
<visualElement>
|
<visualElement>
|
||||||
<elementName>DiodeForeward</elementName>
|
<elementName>DiodeForeward</elementName>
|
||||||
@ -994,6 +983,79 @@ A B C D Y_0 Y_1 Y_2 Y_3
|
|||||||
</elementAttributes>
|
</elementAttributes>
|
||||||
<pos x="1120" y="100"/>
|
<pos x="1120" y="100"/>
|
||||||
</visualElement>
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Testcase</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>Y_0=A xor B</string>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>Testdata</string>
|
||||||
|
<testData>
|
||||||
|
<dataString># y_0 = A xor B
|
||||||
|
|
||||||
|
A B C D Y_0
|
||||||
|
0 0 x x 0
|
||||||
|
0 1 x x 1
|
||||||
|
1 0 x x 1
|
||||||
|
1 1 x x 0
|
||||||
|
</dataString>
|
||||||
|
</testData>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="500" y="740"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Testcase</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>Y_1 = C and D</string>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>Testdata</string>
|
||||||
|
<testData>
|
||||||
|
<dataString># y_1 = C and D
|
||||||
|
|
||||||
|
A B C D Y_1
|
||||||
|
x x 0 0 0
|
||||||
|
x x 0 1 0
|
||||||
|
x x 1 0 0
|
||||||
|
x x 1 1 1
|
||||||
|
</dataString>
|
||||||
|
</testData>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="500" y="820"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Testcase</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>Y_2 = A or (C and D)</string>
|
||||||
|
</entry>
|
||||||
|
<entry>
|
||||||
|
<string>Testdata</string>
|
||||||
|
<testData>
|
||||||
|
<dataString># Y_2 = A or (C and D)
|
||||||
|
|
||||||
|
A B C D Y_2
|
||||||
|
0 x 0 0 0
|
||||||
|
0 x 0 1 0
|
||||||
|
0 x 1 0 0
|
||||||
|
0 x 1 1 1
|
||||||
|
1 x 0 0 1
|
||||||
|
1 x 0 1 1
|
||||||
|
1 x 1 0 1
|
||||||
|
1 x 1 1 1
|
||||||
|
</dataString>
|
||||||
|
</testData>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="780" y="740"/>
|
||||||
|
</visualElement>
|
||||||
</visualElements>
|
</visualElements>
|
||||||
<wires>
|
<wires>
|
||||||
<wire>
|
<wire>
|
||||||
|
@ -29,7 +29,7 @@ public class TestExamples extends TestCase {
|
|||||||
public void testDistExamples() throws Exception {
|
public void testDistExamples() throws Exception {
|
||||||
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
File examples = new File(Resources.getRoot().getParentFile().getParentFile(), "/main/dig");
|
||||||
assertEquals(94, new FileScanner(this::check).scan(examples));
|
assertEquals(94, new FileScanner(this::check).scan(examples));
|
||||||
assertEquals(43, testCasesInFiles);
|
assertEquals(46, testCasesInFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user