From c32fab1db58f78a68a1835020a77fd698fcdd751 Mon Sep 17 00:00:00 2001 From: dernasherbrezon Date: Fri, 13 Oct 2023 19:31:29 +0100 Subject: [PATCH] test for false-positive --- .../jradio/sapling/SaplingGiganteumBeaconTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/ru/r2cloud/jradio/sapling/SaplingGiganteumBeaconTest.java b/src/test/java/ru/r2cloud/jradio/sapling/SaplingGiganteumBeaconTest.java index 8edc6a35..8727205b 100644 --- a/src/test/java/ru/r2cloud/jradio/sapling/SaplingGiganteumBeaconTest.java +++ b/src/test/java/ru/r2cloud/jradio/sapling/SaplingGiganteumBeaconTest.java @@ -9,6 +9,7 @@ import ru.r2cloud.jradio.AssertJson; import ru.r2cloud.jradio.fec.ViterbiTest; +import ru.r2cloud.jradio.fec.ccsds.UncorrectableException; public class SaplingGiganteumBeaconTest { @@ -20,6 +21,13 @@ public void testTelemetry() throws Exception { AssertJson.assertObjectsEqual("SaplingGiganteumBeacon.json", result); } + @Test(expected = UncorrectableException.class) + public void testFalsePositive() throws Exception { + byte[] data = ViterbiTest.hexStringToByteArray("DCCCCF81AE3379095F299902DA7599AAD2E43EA5D0B50CACC1C98DD106510D53265EF152EB8D451F6D16A7D5CC026311CDF5A733DCE6822E9540867AB0596D74F37AEAA259D7B0C5CC113AF25AFBD1CDA7F843831574A99ED341FFE87B5EACD20001FDF3507DDC3477D1EEDA774B7A1B46D88B56B39F330B5B19078A6CC6B69DCFF1A266AA551FE7F2598CEF3E27626A2E23B83F17FA4CDD"); + SaplingGiganteumBeacon result = new SaplingGiganteumBeacon(); + result.readBeacon(data); + } + @Test public void testPojo() { assertThat(SaplingGiganteumBeacon.class, allOf(hasValidBeanConstructor(), hasValidGettersAndSetters()));