mirror of
https://github.com/fankes/JSON-java-compat.git
synced 2025-09-06 10:45:23 +08:00
test(#901): call JsonArray.putAll with a casted list as object
This commit is contained in:
@@ -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),
|
||||||
|
Reference in New Issue
Block a user