Skip to content

Commit b4ab4a2

Browse files
committed
added HashSet encode test
1 parent acab3d5 commit b4ab4a2

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/tests/JsonTest.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@ public static void EncodeListTest4() {
124124
Assert.AreEqual("[true,false]", json);
125125
}
126126

127+
[Test]
128+
public static void EncodeSetTest1() {
129+
HashSet<int> hashSet = new HashSet<int> { 1, 2, 3, 4 };
130+
string json = Json.Encode(hashSet);
131+
132+
Assert.AreEqual("[1,2,3,4]", json);
133+
}
134+
127135
[Test]
128136
public static void EncodeDictTest1() {
129137
Dictionary<string, int> dict = new Dictionary<string, int> {

0 commit comments

Comments
 (0)