Add test case for HexToOct (#3675)
This commit is contained in:
parent
0365afa16a
commit
2e25f89c36
@ -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")));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user