Skip to content

Commit

Permalink
add one case
Browse files Browse the repository at this point in the history
  • Loading branch information
ties committed Feb 23, 2024
1 parent aacc43f commit b7b296b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Check notice

Code scanning / CodeQL

Unread local variable Note test

Variable 'RoaPrefix p2_32' is never read.

// 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);

Check failure on line 64 in src/test/java/net/ripe/rpki/commons/crypto/cms/roa/RoaPrefixTest.java

View workflow job for this annotation

GitHub Actions / Test Report

RoaPrefixTest.testCalculateEffectiveLength

expected: 32 but was: 8
Raw output
org.opentest4j.AssertionFailedError: 

expected: 32
 but was: 8
	at net.ripe.rpki.commons.crypto.cms.roa.RoaPrefixTest.testCalculateEffectiveLength(RoaPrefixTest.java:64)
}

@Test
Expand Down

0 comments on commit b7b296b

Please sign in to comment.