Add test case for HexToOct (#3675)

This commit is contained in:
harshalkhachane 2022-10-26 18:40:25 +05:30 committed by GitHub
parent 0365afa16a
commit 2e25f89c36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")));
}
}