]> sigrok.org Git - sigrok-test.git/commitdiff
nes_gamepad: Add more test-cases.
authorUwe Hermann <redacted>
Sat, 30 Nov 2019 08:31:29 +0000 (09:31 +0100)
committerUwe Hermann <redacted>
Sat, 30 Nov 2019 08:32:37 +0000 (09:32 +0100)
12 files changed:
decoder/test/nes_gamepad/nes_gamepad_generated_a_b.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_b.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_b_select_west.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_east.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_no_button.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_north.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_select.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_south.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_start.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_unconnected.output [new file with mode: 0644]
decoder/test/nes_gamepad/nes_gamepad_generated_west.output [new file with mode: 0644]
decoder/test/nes_gamepad/test.conf

diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_a_b.output b/decoder/test/nes_gamepad/nes_gamepad_generated_a_b.output
new file mode 100644 (file)
index 0000000..f114b32
--- /dev/null
@@ -0,0 +1 @@
+164-407 nes_gamepad: button: "A + B"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_b.output b/decoder/test/nes_gamepad/nes_gamepad_generated_b.output
new file mode 100644 (file)
index 0000000..5ba3a1c
--- /dev/null
@@ -0,0 +1 @@
+117-362 nes_gamepad: button: "B"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_b_select_west.output b/decoder/test/nes_gamepad/nes_gamepad_generated_b_select_west.output
new file mode 100644 (file)
index 0000000..39df456
--- /dev/null
@@ -0,0 +1 @@
+149-393 nes_gamepad: button: "B + Select + West"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_east.output b/decoder/test/nes_gamepad/nes_gamepad_generated_east.output
new file mode 100644 (file)
index 0000000..fea1f75
--- /dev/null
@@ -0,0 +1 @@
+171-416 nes_gamepad: button: "East"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_no_button.output b/decoder/test/nes_gamepad/nes_gamepad_generated_no_button.output
new file mode 100644 (file)
index 0000000..40768a9
--- /dev/null
@@ -0,0 +1 @@
+1064-1309 nes_gamepad: no-press: "No button is pressed"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_north.output b/decoder/test/nes_gamepad/nes_gamepad_generated_north.output
new file mode 100644 (file)
index 0000000..b00df0f
--- /dev/null
@@ -0,0 +1 @@
+122-365 nes_gamepad: button: "North"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_select.output b/decoder/test/nes_gamepad/nes_gamepad_generated_select.output
new file mode 100644 (file)
index 0000000..25cb488
--- /dev/null
@@ -0,0 +1 @@
+154-397 nes_gamepad: button: "Select"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_south.output b/decoder/test/nes_gamepad/nes_gamepad_generated_south.output
new file mode 100644 (file)
index 0000000..66e4787
--- /dev/null
@@ -0,0 +1 @@
+149-392 nes_gamepad: button: "South"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_start.output b/decoder/test/nes_gamepad/nes_gamepad_generated_start.output
new file mode 100644 (file)
index 0000000..054829e
--- /dev/null
@@ -0,0 +1 @@
+115-359 nes_gamepad: button: "Start"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_unconnected.output b/decoder/test/nes_gamepad/nes_gamepad_generated_unconnected.output
new file mode 100644 (file)
index 0000000..706f562
--- /dev/null
@@ -0,0 +1 @@
+154-397 nes_gamepad: not-connected: "Gamepad is not connected"
diff --git a/decoder/test/nes_gamepad/nes_gamepad_generated_west.output b/decoder/test/nes_gamepad/nes_gamepad_generated_west.output
new file mode 100644 (file)
index 0000000..6e5f194
--- /dev/null
@@ -0,0 +1 @@
+148-391 nes_gamepad: button: "West"
index fd3d050b8d14a082fd9919b9d8c498a73ea5e447..4b6edbb1cd5828ec3b760df37f601890d31a5dac 100644 (file)
@@ -1,6 +1,83 @@
+test nes_gamepad_generated_a_b
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/a_b.sr
+       output nes_gamepad annotation match nes_gamepad_generated_a_b.output
+
 test nes_gamepad_generated_a
        protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
        protocol-decoder nes_gamepad
        stack spi nes_gamepad
        input spi/nes_gamepad/nes_gamepad_generated/a.sr
        output nes_gamepad annotation match nes_gamepad_generated_a.output
+
+test nes_gamepad_generated_b_select_west
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/b_select_west.sr
+       output nes_gamepad annotation match nes_gamepad_generated_b_select_west.output
+
+test nes_gamepad_generated_b
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/b.sr
+       output nes_gamepad annotation match nes_gamepad_generated_b.output
+
+test nes_gamepad_generated_east
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/east.sr
+       output nes_gamepad annotation match nes_gamepad_generated_east.output
+
+test nes_gamepad_generated_no_button
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/no_button.sr
+       output nes_gamepad annotation match nes_gamepad_generated_no_button.output
+
+test nes_gamepad_generated_north
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/north.sr
+       output nes_gamepad annotation match nes_gamepad_generated_north.output
+
+test nes_gamepad_generated_select
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/select.sr
+       output nes_gamepad annotation match nes_gamepad_generated_select.output
+
+test nes_gamepad_generated_south
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/south.sr
+       output nes_gamepad annotation match nes_gamepad_generated_south.output
+
+test nes_gamepad_generated_start
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/start.sr
+       output nes_gamepad annotation match nes_gamepad_generated_start.output
+
+test nes_gamepad_generated_unconnected
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/unconnected.sr
+       output nes_gamepad annotation match nes_gamepad_generated_unconnected.output
+
+test nes_gamepad_generated_west
+       protocol-decoder spi channel cs=0 channel clk=2 channel miso=1 option cpol=1
+       protocol-decoder nes_gamepad
+       stack spi nes_gamepad
+       input spi/nes_gamepad/nes_gamepad_generated/west.sr
+       output nes_gamepad annotation match nes_gamepad_generated_west.output