Added tests for JsonPrimitive object creation with a char type.

Suggestion from r321 code review.
This commit is contained in:
Joel Leitch 2008-12-18 20:06:20 +00:00
parent cbc6b4d939
commit 17256b8ce5

View File

@ -58,10 +58,14 @@ public class JsonPrimitiveTest extends TestCase {
public void testStringsAndChar() throws Exception {
JsonPrimitive json = new JsonPrimitive("abc");
assertTrue(json.isString());
assertEquals('a', json.getAsCharacter());
assertEquals("abc", json.getAsString());
json = new JsonPrimitive('z');
assertTrue(json.isString());
assertEquals('z', json.getAsCharacter());
assertEquals("z", json.getAsString());
}
public void testExponential() throws Exception {