mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-07 01:35:16 +08:00
Add test case for BinaryToHexadecimal (#3694)
This commit is contained in:
@ -0,0 +1,14 @@
|
|||||||
|
package com.thealgorithms.conversions;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
public class BinaryToHexadecimalTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBinaryToHexadecimal() {
|
||||||
|
assertEquals("6A", BinaryToHexadecimal.binToHex(1101010));
|
||||||
|
assertEquals("C", BinaryToHexadecimal.binToHex(1100));
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user