mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
add test
This commit is contained in:
parent
2f9fa2c29a
commit
9c3bf7b6ca
@ -124,6 +124,14 @@ public class JSONObjectTest {
|
||||
Assert.assertEquals("体”、“文", json.getStr("test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseStringTest4() {
|
||||
String jsonStr = "{'msg':'这里还没有内容','data':{'cards':[]},'ok':0}";
|
||||
JSONObject json = new JSONObject(jsonStr);
|
||||
Assert.assertEquals(new Integer(0), json.getInt("ok"));
|
||||
Assert.assertEquals(new JSONArray(), json.getJSONObject("data").getJSONArray("cards"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void parseStringWithBomTest() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user