From 2e25f89c36be3344d3ff2f09e2e585c3eec02a78 Mon Sep 17 00:00:00 2001 From: harshalkhachane <92866584+harshalkhachane@users.noreply.github.com> Date: Wed, 26 Oct 2022 18:40:25 +0530 Subject: [PATCH] Add test case for HexToOct (#3675) --- .../thealgorithms/conversions/HexToOctTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/java/com/thealgorithms/conversions/HexToOctTest.java diff --git a/src/test/java/com/thealgorithms/conversions/HexToOctTest.java b/src/test/java/com/thealgorithms/conversions/HexToOctTest.java new file mode 100644 index 00000000..d6a9b609 --- /dev/null +++ b/src/test/java/com/thealgorithms/conversions/HexToOctTest.java @@ -0,0 +1,14 @@ +package com.thealgorithms.conversions; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +public class HexToOctTest { + + @Test + public void testHexToOct() { + assertEquals(110, HexToOct.decimal2octal(HexToOct.hex2decimal("48"))); + assertEquals(255, HexToOct.decimal2octal(HexToOct.hex2decimal("AD"))); + } +}