summaryrefslogtreecommitdiffstats
path: root/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java')
-rw-r--r--vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
index fb4c61b55..3ed7433ea 100644
--- a/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
+++ b/vpp-common/vpp-translate-utils/src/test/java/io/fd/hc2vpp/common/translate/util/Ipv6TranslatorTest.java
@@ -63,13 +63,20 @@ public class Ipv6TranslatorTest implements Ipv6Translator {
}
@Test
+ public void testArrayToIpv6Prefix48() {
+ assertEquals("2001:db8:a0b:12f0::1/48",
+ toIpv6Prefix(new byte[]{32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 1},
+ (byte) 48).getValue());
+ }
+
+ @Test
public void testArrayToIpv6Prefix64() throws Exception {
- assertEquals(IPV6_COMPRESSED + "/64", arrayToIpv6Prefix(IPV6_BYTES, 64).getValue());
+ assertEquals(IPV6_COMPRESSED + "/64", toIpv6Prefix(IPV6_BYTES, 64).getValue());
}
@Test
public void testArrayToIpv6Prefix128() throws Exception {
- assertEquals(IPV6_COMPRESSED + "/128", arrayToIpv6Prefix(IPV6_BYTES, 128).getValue());
+ assertEquals(IPV6_COMPRESSED + "/128", toIpv6Prefix(IPV6_BYTES, 128).getValue());
}
@Test
@@ -129,11 +136,4 @@ public class Ipv6TranslatorTest implements Ipv6Translator {
public void testExtractPrefix() {
assertEquals(48, extractPrefix(new Ipv6Prefix("3ffe:1900:4545:3:200:f8ff:fe21:67cf/48")));
}
-
- @Test
- public void toPrefix() {
- assertEquals("2001:db8:a0b:12f0:0:0:0:1/48",
- toIpv6Prefix(new byte[]{32, 1, 13, -72, 10, 11, 18, -16, 0, 0, 0, 0, 0, 0, 0, 1},
- (byte) 48).getValue());
- }
} \ No newline at end of file