projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow passing null to JsonArray.Add()
[mono.git]
/
mcs
/
class
/
System.Json
/
Test
/
System.Json
/
JsonValueTest.cs
diff --git
a/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
b/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
index b267bd7c98e4e10fef7e93e91cebdf63dedca924..baff3cc32b181579cbcbb199970fde60290d7cb4 100644
(file)
--- a/
mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
+++ b/
mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
@@
-44,6
+44,9
@@
namespace MonoTests.System
Assert.AreEqual (JsonType.Array, j.JsonType, "type");
var str = j.ToString ();
Assert.AreEqual (str, "[1, 2, 3, null]");
Assert.AreEqual (JsonType.Array, j.JsonType, "type");
var str = j.ToString ();
Assert.AreEqual (str, "[1, 2, 3, null]");
+ ((JsonArray) j).Add (null);
+ str = j.ToString ();
+ Assert.AreEqual (str, "[1, 2, 3, null, null]");
}
// Test that we correctly serialize JsonObject with null elements.
}
// Test that we correctly serialize JsonObject with null elements.