summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Steinhauser <jens.steinhauser@gmail.com>2014-10-19 21:33:48 +0200
committerJens Steinhauser <jens.steinhauser@gmail.com>2014-10-19 22:02:04 +0200
commit17d8e99f3b5660d8c3da4bed5908eb6b1d37f204 (patch)
tree4484e10ffc05f92745b160c412a7f30f8e71a8d6
parentcf646afd93e5752fb2f662c7c13df11dd8ab9d73 (diff)
downloadsigrok-test-17d8e99f3b5660d8c3da4bed5908eb6b1d37f204.tar.gz
sigrok-test-17d8e99f3b5660d8c3da4bed5908eb6b1d37f204.zip
nrf24l01: Add test cases.
-rw-r--r--decoder/test/nrf24l01/nrf24l01_incomplete_cmd_cmd.output1
-rw-r--r--decoder/test/nrf24l01/test.conf14
2 files changed, 15 insertions, 0 deletions
diff --git a/decoder/test/nrf24l01/nrf24l01_incomplete_cmd_cmd.output b/decoder/test/nrf24l01/nrf24l01_incomplete_cmd_cmd.output
new file mode 100644
index 0000000..83eea9e
--- /dev/null
+++ b/decoder/test/nrf24l01/nrf24l01_incomplete_cmd_cmd.output
@@ -0,0 +1 @@
+39-55 nrf24l01: cmd: "Cmd FLUSH_TX"
diff --git a/decoder/test/nrf24l01/test.conf b/decoder/test/nrf24l01/test.conf
index 986d30d..252b7d2 100644
--- a/decoder/test/nrf24l01/test.conf
+++ b/decoder/test/nrf24l01/test.conf
@@ -27,6 +27,13 @@ test excess-bytes
input spi/nrf24l01/nrf24l01-test-excess-bytes.sr
output nrf24l01 annotation class warning match nrf24l01_excess_bytes_warning.output
+test incomplete-cmd
+ protocol-decoder spi channel cs=0 channel clk=1 channel mosi=2 channel miso=3
+ protocol-decoder nrf24l01
+ stack spi nrf24l01
+ input spi/nrf24l01/nrf24l01-test-incomplete-cmd.sr
+ output nrf24l01 annotation class cmd match nrf24l01_incomplete_cmd_cmd.output
+
test misc
protocol-decoder spi channel cs=0 channel clk=1 channel mosi=2 channel miso=3
protocol-decoder nrf24l01
@@ -51,6 +58,13 @@ test no-command
input spi/nrf24l01/nrf24l01-test-no-command.sr
output nrf24l01 annotation class register match nrf24l01_no_command_register.output
+test no-cs
+ protocol-decoder spi channel clk=1 channel mosi=2 channel miso=3
+ protocol-decoder nrf24l01
+ stack spi nrf24l01
+ input spi/nrf24l01/nrf24l01-test-no-command.sr
+ output nrf24l01 exception match ChannelError
+
test no-mosi
protocol-decoder spi channel cs=0 channel clk=1 channel miso=3
protocol-decoder nrf24l01