From cdb3d4b882b41bd6bf8904ad467772f234a724d9 Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Sat, 18 Jul 2020 21:48:02 +0200 Subject: caliper: introduce tests (pos/neg, mm/inch, change) Add tests for the caliper decoder. Cover positive and negative numbers, automatic millimeter and inch detection, and omitted annotations when values haven't changed. --- decoder/test/caliper/test.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 decoder/test/caliper/test.conf (limited to 'decoder/test/caliper/test.conf') diff --git a/decoder/test/caliper/test.conf b/decoder/test/caliper/test.conf new file mode 100644 index 0000000..a5983bd --- /dev/null +++ b/decoder/test/caliper/test.conf @@ -0,0 +1,19 @@ +test caliper_pos_mm + protocol-decoder caliper channel clk=1 channel data=0 + input caliper/caliper0.55mm.sr + output caliper annotation match caliper_pos_mm.output + +test caliper_neg_mm + protocol-decoder caliper channel clk=1 channel data=0 + input caliper/caliper-123.45mm.sr + output caliper annotation match caliper_neg_mm.output + +test caliper_pos_in + protocol-decoder caliper channel clk=1 channel data=0 + input caliper/caliper0.5in.sr + output caliper annotation match caliper_pos_in.output + +test caliper_only_change + protocol-decoder caliper channel clk=1 channel data=0 option changes=yes + input caliper/caliper100mm.sr + output caliper annotation match caliper_only_change.output -- cgit v1.2.3-54-g00ecf