mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 11:25:30 -04:00
test(#901): call JsonArray.putAll with a casted list as object
This commit is contained in:
parent
14f71274f7
commit
0d71dcf713
@ -259,6 +259,11 @@ public class JSONArrayTest {
|
|||||||
jsonArray.length(),
|
jsonArray.length(),
|
||||||
len);
|
len);
|
||||||
|
|
||||||
|
// collection as object
|
||||||
|
@SuppressWarnings("RedundantCast")
|
||||||
|
Object myListAsObject = (Object) myList;
|
||||||
|
jsonArray.putAll(myListAsObject);
|
||||||
|
|
||||||
for (int i = 0; i < myList.size(); i++) {
|
for (int i = 0; i < myList.size(); i++) {
|
||||||
assertEquals("collection elements should be equal",
|
assertEquals("collection elements should be equal",
|
||||||
myList.get(i),
|
myList.get(i),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user