From b2bb2bf9232fd9a16bb94c162e26e8890d225e36 Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Wed, 4 Mar 2020 10:42:47 -0500 Subject: [PATCH] Add tests for minor_58 and minor_62 --- src/decoder/power_decoder.py | 8 ++++---- src/decoder/test/test_power_decoder.py | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/decoder/power_decoder.py b/src/decoder/power_decoder.py index dcfe7a97..a2699a91 100644 --- a/src/decoder/power_decoder.py +++ b/src/decoder/power_decoder.py @@ -171,10 +171,10 @@ pminor = [ opint=True, bitsel=(1, 5)), Subdecoder(pattern=31, csv=get_csv("minor_31.csv"), opint=True, bitsel=(1, 11)), - # Subdecoder(pattern=58, csv=get_csv("minor_58.csv"), - # opint=True, bitsel=(0, 1)), - # Subdecoder(pattern=62, csv=get_csv("minor_62.csv"), - # opint=True, bitsel=(0, 1)), + Subdecoder(pattern=58, csv=get_csv("minor_58.csv"), + opint=True, bitsel=(0, 2)), + Subdecoder(pattern=62, csv=get_csv("minor_62.csv"), + opint=True, bitsel=(0, 2)), ] opcodes = get_csv("major.csv") diff --git a/src/decoder/test/test_power_decoder.py b/src/decoder/test/test_power_decoder.py index 18686714..9b054b1d 100644 --- a/src/decoder/test/test_power_decoder.py +++ b/src/decoder/test/test_power_decoder.py @@ -120,6 +120,15 @@ class DecoderTestCase(FHDLTestCase): self.run_tst((1, 11), "minor_31.csv", minor=(31, (26, 32))) self.generate_ilang((1, 11), "minor_31.csv", suffix=(0, 5)) + def test_minor_58(self): + self.run_tst((0, 2), "minor_58.csv", minor=(58, (26, 32))) + self.generate_ilang((0, 2), "minor_58.csv") + + def test_minor_62(self): + self.run_tst((0, 2), "minor_62.csv", minor=(62, (26, 32))) + self.generate_ilang((0, 2), "minor_62.csv") + + # #def test_minor_31_prefix(self): # # self.run_tst(10, "minor_31.csv", suffix=(5, 10)) # # self.generate_ilang(10, "minor_31.csv", suffix=(5, 10)) -- 2.30.2