Skip to content

Commit 2e25f89

Browse files
Add test case for HexToOct (TheAlgorithms#3675)
1 parent 0365afa commit 2e25f89

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.thealgorithms.conversions;
2+
3+
import static org.junit.jupiter.api.Assertions.*;
4+
5+
import org.junit.jupiter.api.Test;
6+
7+
public class HexToOctTest {
8+
9+
@Test
10+
public void testHexToOct() {
11+
assertEquals(110, HexToOct.decimal2octal(HexToOct.hex2decimal("48")));
12+
assertEquals(255, HexToOct.decimal2octal(HexToOct.hex2decimal("AD")));
13+
}
14+
}

0 commit comments

Comments
 (0)