mirror of
https://github.com/AppleCommander/bastools.git
synced 2024-06-09 04:29:28 +00:00
Testing a few other types of input.
This commit is contained in:
parent
722fee2b6d
commit
6989a186e6
|
@ -8,8 +8,10 @@ public class ConverterTest {
|
||||||
@Test
|
@Test
|
||||||
public void testToInteger() {
|
public void testToInteger() {
|
||||||
assertEquals(0x1000, Converters.toInteger("0x1000").intValue());
|
assertEquals(0x1000, Converters.toInteger("0x1000").intValue());
|
||||||
|
assertEquals(0x1000, Converters.toInteger("0X1000").intValue());
|
||||||
assertEquals(0x1000, Converters.toInteger("$1000").intValue());
|
assertEquals(0x1000, Converters.toInteger("$1000").intValue());
|
||||||
assertEquals(1000, Converters.toInteger("1000").intValue());
|
assertEquals(1000, Converters.toInteger("1000").intValue());
|
||||||
|
assertNull(Converters.toInteger(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -20,6 +22,7 @@ public class ConverterTest {
|
||||||
assertFalse(Converters.toBoolean("faLse"));
|
assertFalse(Converters.toBoolean("faLse"));
|
||||||
assertFalse(Converters.toBoolean("No"));
|
assertFalse(Converters.toBoolean("No"));
|
||||||
assertFalse(Converters.toBoolean("notreally"));
|
assertFalse(Converters.toBoolean("notreally"));
|
||||||
|
assertNull(Converters.toBoolean(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue
Block a user