File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,15 @@ class JSONParserKtTest {
56
56
assertEquals(result.toString(), jsonParse(input).toString()) // toString as the equals method is not completely implemented
57
57
}
58
58
59
+ @Test
60
+ fun `empty object test` () {
61
+ val input = " {}"
62
+
63
+ val result = HashMap <String , Any ?>()
64
+
65
+ assertEquals(result.toString(), jsonParse(input).toString()) // toString as the equals method is not completely implemented
66
+ }
67
+
59
68
@Test
60
69
fun `array test` () {
61
70
val input = """
@@ -73,6 +82,15 @@ class JSONParserKtTest {
73
82
assertEquals(result.toString(), jsonParse(input).toString())
74
83
}
75
84
85
+ @Test
86
+ fun `empty array test` () {
87
+ val input = " []"
88
+
89
+ val result = ArrayList <Any ?>()
90
+
91
+ assertEquals(result.toString(), jsonParse(input).toString())
92
+ }
93
+
76
94
@Test
77
95
fun `nested test` () {
78
96
val input = """
You can’t perform that action at this time.
0 commit comments