From b7b296b5ddc3480cdd6f25d4ce48f25f326b0703 Mon Sep 17 00:00:00 2001 From: Ties de Kock Date: Fri, 23 Feb 2024 11:25:27 +0100 Subject: [PATCH] add one case --- .../net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java b/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java index 300133c2..efffdbd9 100644 --- a/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java +++ b/src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java @@ -55,9 +55,13 @@ public void testCalculateEffectiveLength() { var p2 = new RoaPrefix(IpRange.parse("11.0.0.0/8")); // An equal copy of p2 var p2_8 = new RoaPrefix(IpRange.parse("11.0.0.0/8"), 8); + var p2_32 = new RoaPrefix(IpRange.parse("11.0.0.0/8"), 32); + // implict maximum length is the prefix length assertThat(p2.getEffectiveMaximumLength()).isEqualTo(8); assertThat(p2_8.getEffectiveMaximumLength()).isEqualTo(8); + // and effective maximum length reflects the actual maximum length + assertThat(p2_8.getEffectiveMaximumLength()).isEqualTo(32); } @Test