seven_segment: Add three test-cases
authorBenedikt Otto <benedikt_o@web.de>
Sat, 12 Oct 2019 17:56:39 +0000 (19:56 +0200)
committerUwe Hermann <uwe@hermann-uwe.de>
Wed, 6 Nov 2019 23:09:24 +0000 (00:09 +0100)
decoder/test/seven_segment/test.conf [new file with mode: 0644]
decoder/test/seven_segment/test_7_segment_0-9.output [new file with mode: 0644]
decoder/test/seven_segment/test_7_segment_0-F.output [new file with mode: 0644]
decoder/test/seven_segment/test_7_segment_slow.output [new file with mode: 0644]

diff --git a/decoder/test/seven_segment/test.conf b/decoder/test/seven_segment/test.conf
new file mode 100644 (file)
index 0000000..70ff756
--- /dev/null
@@ -0,0 +1,14 @@
+test test_7_segment_0-9
+       protocol-decoder seven_segment channel a=0 channel b=1 channel c=2 channel d=3 channel e=4 channel f=5 channel g=6 channel dp=7
+       input display/seven_segment/test_7_segment_0-9.sr
+       output seven_segment annotation match test_7_segment_0-9.output
+
+test test_7_segment_0-F
+       protocol-decoder seven_segment channel a=0 channel b=1 channel c=2 channel d=3 channel e=4 channel f=5 channel g=6 channel dp=7
+       input display/seven_segment/test_7_segment_0-F.sr
+       output seven_segment annotation match test_7_segment_0-F.output
+
+test test_7_segment_slow
+       protocol-decoder seven_segment channel a=0 channel b=1 channel c=2 channel d=3 channel e=4 channel f=5 channel g=6 channel dp=7 option polarity=common-anode
+       input display/seven_segment/test_7_segment_slow.sr
+       output seven_segment annotation match test_7_segment_slow.output
diff --git a/decoder/test/seven_segment/test_7_segment_0-9.output b/decoder/test/seven_segment/test_7_segment_0-9.output
new file mode 100644 (file)
index 0000000..1234e8f
--- /dev/null
@@ -0,0 +1,10 @@
+0-1 seven_segment: decoded-digit: "0"
+1-2 seven_segment: decoded-digit: "1"
+2-3 seven_segment: decoded-digit: "2"
+3-4 seven_segment: decoded-digit: "3"
+4-5 seven_segment: decoded-digit: "4"
+5-6 seven_segment: decoded-digit: "5"
+6-7 seven_segment: decoded-digit: "6"
+7-8 seven_segment: decoded-digit: "7"
+8-9 seven_segment: decoded-digit: "8"
+9-10 seven_segment: decoded-digit: "9"
diff --git a/decoder/test/seven_segment/test_7_segment_0-F.output b/decoder/test/seven_segment/test_7_segment_0-F.output
new file mode 100644 (file)
index 0000000..367b087
--- /dev/null
@@ -0,0 +1,16 @@
+0-1 seven_segment: decoded-digit: "0"
+1-2 seven_segment: decoded-digit: "1"
+2-3 seven_segment: decoded-digit: "2"
+3-4 seven_segment: decoded-digit: "3"
+4-5 seven_segment: decoded-digit: "4"
+5-6 seven_segment: decoded-digit: "5"
+6-7 seven_segment: decoded-digit: "6"
+7-8 seven_segment: decoded-digit: "7"
+8-9 seven_segment: decoded-digit: "8"
+9-10 seven_segment: decoded-digit: "9"
+10-11 seven_segment: decoded-digit: "A"
+11-12 seven_segment: decoded-digit: "B"
+12-13 seven_segment: decoded-digit: "C"
+13-14 seven_segment: decoded-digit: "D"
+14-15 seven_segment: decoded-digit: "E"
+15-16 seven_segment: decoded-digit: "F"
diff --git a/decoder/test/seven_segment/test_7_segment_slow.output b/decoder/test/seven_segment/test_7_segment_slow.output
new file mode 100644 (file)
index 0000000..b4fae6c
--- /dev/null
@@ -0,0 +1,49 @@
+0-4612 seven_segment: decoded-digit: "E"
+4612-4613 seven_segment: decoded-digit: "E."
+4613-14615 seven_segment: decoded-digit: "F."
+14615-24617 seven_segment: decoded-digit: "F"
+24617-24618 seven_segment: decoded-digit: "F."
+24618-34621 seven_segment: decoded-digit: "0."
+34621-44623 seven_segment: decoded-digit: "0"
+44624-54626 seven_segment: decoded-digit: "1."
+54626-64628 seven_segment: decoded-digit: "1"
+64628-64629 seven_segment: decoded-digit: "7."
+64629-74631 seven_segment: decoded-digit: "2."
+74631-84634 seven_segment: decoded-digit: "2"
+84634-94637 seven_segment: decoded-digit: "3."
+94637-104639 seven_segment: decoded-digit: "3"
+104640-114642 seven_segment: decoded-digit: "4."
+114642-124644 seven_segment: decoded-digit: "4"
+124644-124645 seven_segment: decoded-digit: "4."
+124645-134648 seven_segment: decoded-digit: "5."
+134648-144650 seven_segment: decoded-digit: "5"
+144650-144651 seven_segment: decoded-digit: "5."
+144651-154653 seven_segment: decoded-digit: "6."
+154653-164655 seven_segment: decoded-digit: "6"
+164655-164656 seven_segment: decoded-digit: "6."
+164656-174658 seven_segment: decoded-digit: "7."
+174658-184661 seven_segment: decoded-digit: "7"
+184661-184662 seven_segment: decoded-digit: "0."
+184662-194664 seven_segment: decoded-digit: "8."
+194664-204666 seven_segment: decoded-digit: "8"
+204666-204667 seven_segment: decoded-digit: "8."
+204667-214669 seven_segment: decoded-digit: "9."
+214669-224672 seven_segment: decoded-digit: "9"
+224672-234675 seven_segment: decoded-digit: "A."
+234675-244677 seven_segment: decoded-digit: "A"
+244678-254680 seven_segment: decoded-digit: "B."
+254680-264682 seven_segment: decoded-digit: "B"
+264682-264683 seven_segment: decoded-digit: "B."
+264683-274686 seven_segment: decoded-digit: "C."
+274686-284688 seven_segment: decoded-digit: "C"
+284689-294691 seven_segment: decoded-digit: "D."
+294691-304693 seven_segment: decoded-digit: "D"
+304693-304694 seven_segment: decoded-digit: "D."
+304694-314697 seven_segment: decoded-digit: "E."
+314697-324699 seven_segment: decoded-digit: "E"
+324699-334702 seven_segment: decoded-digit: "F."
+334702-344704 seven_segment: decoded-digit: "F"
+344704-344705 seven_segment: decoded-digit: "F."
+344705-354708 seven_segment: decoded-digit: "0."
+354708-364710 seven_segment: decoded-digit: "0"
+364711-374713 seven_segment: decoded-digit: "1."