From 0bbacb19255e72a2f4052c4bd409f9d5dfb172e5 Mon Sep 17 00:00:00 2001 From: harshalkhachane <92866584+harshalkhachane@users.noreply.github.com> Date: Wed, 26 Oct 2022 21:34:26 +0530 Subject: [PATCH] Add test case for OctalToHexadecimal (#3679) --- .../conversions/OctalToHexadecimalTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/test/java/com/thealgorithms/conversions/OctalToHexadecimalTest.java diff --git a/src/test/java/com/thealgorithms/conversions/OctalToHexadecimalTest.java b/src/test/java/com/thealgorithms/conversions/OctalToHexadecimalTest.java new file mode 100644 index 00000000..347f0eb8 --- /dev/null +++ b/src/test/java/com/thealgorithms/conversions/OctalToHexadecimalTest.java @@ -0,0 +1,14 @@ +package com.thealgorithms.conversions; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +public class OctalToHexadecimalTest { + + @Test + public void testOctalToHexadecimal() { + assertEquals("1EA", OctalToHexadecimal.decimalToHex(OctalToHexadecimal.octToDec("752"))); + assertEquals("15E", OctalToHexadecimal.decimalToHex(OctalToHexadecimal.octToDec("536"))); + } +}