mirror of
https://github.com/hneemann/Digital.git
synced 2025-10-04 10:22:52 -04:00
added a FET switch test
This commit is contained in:
parent
85f18defaa
commit
ffe1b77a7d
@ -39,8 +39,8 @@ public class TestExamples extends TestCase {
|
|||||||
*/
|
*/
|
||||||
public void testTestExamples() throws Exception {
|
public void testTestExamples() throws Exception {
|
||||||
File examples = new File(Resources.getRoot(), "/dig/test");
|
File examples = new File(Resources.getRoot(), "/dig/test");
|
||||||
assertEquals(73, new FileScanner(this::check).scan(examples));
|
assertEquals(74, new FileScanner(this::check).scan(examples));
|
||||||
assertEquals(67, testCasesInFiles);
|
assertEquals(68, testCasesInFiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
120
src/test/resources/dig/test/fet/switchTest.dig
Normal file
120
src/test/resources/dig/test/fet/switchTest.dig
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<circuit>
|
||||||
|
<version>1</version>
|
||||||
|
<attributes/>
|
||||||
|
<visualElements>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>NFET</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="420" y="240"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>NFET</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="420" y="320"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Ground</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="440" y="380"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>VDD</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="400" y="260"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Out</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>Y</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="500" y="300"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>In</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Label</string>
|
||||||
|
<string>A</string>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="400" y="360"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>Testcase</elementName>
|
||||||
|
<elementAttributes>
|
||||||
|
<entry>
|
||||||
|
<string>Testdata</string>
|
||||||
|
<testData>
|
||||||
|
<dataString>A Y
|
||||||
|
0 1
|
||||||
|
1 0
|
||||||
|
0 1
|
||||||
|
1 0
|
||||||
|
0 1
|
||||||
|
</dataString>
|
||||||
|
</testData>
|
||||||
|
</entry>
|
||||||
|
</elementAttributes>
|
||||||
|
<pos x="480" y="340"/>
|
||||||
|
</visualElement>
|
||||||
|
<visualElement>
|
||||||
|
<elementName>PullUp</elementName>
|
||||||
|
<elementAttributes/>
|
||||||
|
<pos x="480" y="200"/>
|
||||||
|
</visualElement>
|
||||||
|
</visualElements>
|
||||||
|
<wires>
|
||||||
|
<wire>
|
||||||
|
<p1 x="400" y="280"/>
|
||||||
|
<p2 x="420" y="280"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="400" y="360"/>
|
||||||
|
<p2 x="420" y="360"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="440" y="220"/>
|
||||||
|
<p2 x="480" y="220"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="440" y="300"/>
|
||||||
|
<p2 x="480" y="300"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="480" y="300"/>
|
||||||
|
<p2 x="500" y="300"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="480" y="200"/>
|
||||||
|
<p2 x="480" y="220"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="480" y="220"/>
|
||||||
|
<p2 x="480" y="300"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="400" y="260"/>
|
||||||
|
<p2 x="400" y="280"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="440" y="280"/>
|
||||||
|
<p2 x="440" y="300"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="440" y="360"/>
|
||||||
|
<p2 x="440" y="380"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="440" y="220"/>
|
||||||
|
<p2 x="440" y="240"/>
|
||||||
|
</wire>
|
||||||
|
<wire>
|
||||||
|
<p1 x="440" y="300"/>
|
||||||
|
<p2 x="440" y="320"/>
|
||||||
|
</wire>
|
||||||
|
</wires>
|
||||||
|
</circuit>
|
Loading…
x
Reference in New Issue
Block a user