Skip to content

Commit

Permalink
added a reverse order splitter port test case
Browse files Browse the repository at this point in the history
  • Loading branch information
hneemann committed Jun 5, 2017
1 parent cc6f0da commit 4250580
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public void testDistExamples() throws Exception {
*/
public void testTestExamples() throws Exception {
File examples = new File(Resources.getRoot(), "/dig/test");
assertEquals(71, new FileScanner(this::check).scan(examples));
assertEquals(65, testCasesInFiles);
assertEquals(72, new FileScanner(this::check).scan(examples));
assertEquals(66, testCasesInFiles);
}


Expand Down
110 changes: 110 additions & 0 deletions src/test/resources/dig/test/splitter/splitter4.dig
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="utf-8"?>
<circuit>
<version>1</version>
<attributes/>
<visualElements>
<visualElement>
<elementName>Splitter</elementName>
<elementAttributes>
<entry>
<string>Input Splitting</string>
<string>4</string>
</entry>
<entry>
<string>Output Splitting</string>
<string>3-3,2-2,1-1,0-0</string>
</entry>
</elementAttributes>
<pos x="400" y="200"/>
</visualElement>
<visualElement>
<elementName>In</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>A</string>
</entry>
<entry>
<string>Bits</string>
<int>4</int>
</entry>
</elementAttributes>
<pos x="360" y="200"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>X</string>
</entry>
</elementAttributes>
<pos x="460" y="200"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>Z</string>
</entry>
</elementAttributes>
<pos x="460" y="240"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>Y</string>
</entry>
</elementAttributes>
<pos x="560" y="220"/>
</visualElement>
<visualElement>
<elementName>Testcase</elementName>
<elementAttributes>
<entry>
<string>Testdata</string>
<testData>
<dataString> A X Y Z U
repeat(16) (n) ((n&gt;&gt;3)&amp;1) ((n&gt;&gt;2)&amp;1) ((n&gt;&gt;1)&amp;1) (n&amp;1)</dataString>
</testData>
</entry>
</elementAttributes>
<pos x="400" y="280"/>
</visualElement>
<visualElement>
<elementName>Out</elementName>
<elementAttributes>
<entry>
<string>Label</string>
<string>U</string>
</entry>
</elementAttributes>
<pos x="560" y="260"/>
</visualElement>
</visualElements>
<wires>
<wire>
<p1 x="420" y="240"/>
<p2 x="460" y="240"/>
</wire>
<wire>
<p1 x="420" y="260"/>
<p2 x="560" y="260"/>
</wire>
<wire>
<p1 x="360" y="200"/>
<p2 x="400" y="200"/>
</wire>
<wire>
<p1 x="420" y="200"/>
<p2 x="460" y="200"/>
</wire>
<wire>
<p1 x="420" y="220"/>
<p2 x="560" y="220"/>
</wire>
</wires>
</circuit>

0 comments on commit 4250580

Please sign in to comment.