summaryrefslogtreecommitdiff
path: root/decoder/test/caliper/test.conf
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2020-07-18 21:48:02 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2020-07-18 21:48:02 +0200
commitcdb3d4b882b41bd6bf8904ad467772f234a724d9 (patch)
tree37845a33fc582e0589698bba800e90648f5bfeb6 /decoder/test/caliper/test.conf
parent1b9e3b7d00f22a0d5da2fda2cdaf108be97d2c56 (diff)
downloadsigrok-test-cdb3d4b882b41bd6bf8904ad467772f234a724d9.tar.gz
sigrok-test-cdb3d4b882b41bd6bf8904ad467772f234a724d9.zip
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.
Diffstat (limited to 'decoder/test/caliper/test.conf')
-rw-r--r--decoder/test/caliper/test.conf19
1 files changed, 19 insertions, 0 deletions
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