From: Uwe Hermann Date: Tue, 21 Jul 2015 20:01:12 +0000 (+0200) Subject: guess_bitrate: Add a few test-cases. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=474383685d2167a0dc155def2df2cd47a931a13a;p=sigrok-test.git guess_bitrate: Add a few test-cases. --- diff --git a/decoder/test/guess_bitrate/es51978.output b/decoder/test/guess_bitrate/es51978.output new file mode 100644 index 0000000..fc052ec --- /dev/null +++ b/decoder/test/guess_bitrate/es51978.output @@ -0,0 +1,2 @@ +24340-24382 guess_bitrate: bitrate: "2380" +24382-24423 guess_bitrate: bitrate: "2439" diff --git a/decoder/test/guess_bitrate/mcp2515dm-bm-125kbits_msg_222_5bytes.output b/decoder/test/guess_bitrate/mcp2515dm-bm-125kbits_msg_222_5bytes.output new file mode 100644 index 0000000..e71f1ca --- /dev/null +++ b/decoder/test/guess_bitrate/mcp2515dm-bm-125kbits_msg_222_5bytes.output @@ -0,0 +1,3 @@ +2377803-2377867 guess_bitrate: bitrate: "62500" +2377867-2377899 guess_bitrate: bitrate: "125000" +2378988-2379019 guess_bitrate: bitrate: "129032" diff --git a/decoder/test/guess_bitrate/nrf24l01-communication.output b/decoder/test/guess_bitrate/nrf24l01-communication.output new file mode 100644 index 0000000..ae8b6bc --- /dev/null +++ b/decoder/test/guess_bitrate/nrf24l01-communication.output @@ -0,0 +1,3 @@ +105962-105997 guess_bitrate: bitrate: "342857" +105997-105999 guess_bitrate: bitrate: "6000000" +105999-106000 guess_bitrate: bitrate: "12000000" diff --git a/decoder/test/guess_bitrate/rtc_epson_8564je.output b/decoder/test/guess_bitrate/rtc_epson_8564je.output new file mode 100644 index 0000000..8933e98 --- /dev/null +++ b/decoder/test/guess_bitrate/rtc_epson_8564je.output @@ -0,0 +1 @@ +6-16 guess_bitrate: bitrate: "100000" diff --git a/decoder/test/guess_bitrate/sl-814_uart_run.output b/decoder/test/guess_bitrate/sl-814_uart_run.output new file mode 100644 index 0000000..0c53d3e --- /dev/null +++ b/decoder/test/guess_bitrate/sl-814_uart_run.output @@ -0,0 +1 @@ +249138-249242 guess_bitrate: bitrate: "9615" diff --git a/decoder/test/guess_bitrate/test.conf b/decoder/test/guess_bitrate/test.conf index ff39fea..bc59c83 100644 --- a/decoder/test/guess_bitrate/test.conf +++ b/decoder/test/guess_bitrate/test.conf @@ -2,3 +2,28 @@ test exception_samplerate protocol-decoder guess_bitrate input misc/no-samplerate.sr output guess_bitrate exception match SamplerateError + +test es51978 + protocol-decoder guess_bitrate channel data=0 + input uart/cyrustek_es51978/es51978.sr + output guess_bitrate annotation match es51978.output + +test sl-814_uart_run + protocol-decoder guess_bitrate channel data=0 + input uart/tondaj_sl-814/sl-814_uart_run.sr + output guess_bitrate annotation match sl-814_uart_run.output + +test mcp2515dm-bm-125kbits_msg_222_5bytes + protocol-decoder guess_bitrate channel data=2 + input can/microchip_mcp2515dm-bm/mcp2515dm-bm-125kbits_msg_222_5bytes.sr + output guess_bitrate annotation match mcp2515dm-bm-125kbits_msg_222_5bytes.output + +test rtc_epson_8564je + protocol-decoder guess_bitrate channel data=0 + input i2c/rtc_epson_8564je/rtc_epson_8564je.sr + output guess_bitrate annotation match rtc_epson_8564je.output + +test nrf24l01-communication + protocol-decoder guess_bitrate channel data=7 + input spi/nrf24l01/nrf24l01-communication.sr + output guess_bitrate annotation match nrf24l01-communication.output