Skip to content

Commit 0bb2249

Browse files
committed
Better test case added
1 parent 0703318 commit 0bb2249

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

examples/JSONObject/JSONObject.ino

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ void demoCreation() {
8484
myObject["x3"] = (unsigned long) 42;
8585

8686
int x1 = myObject["x1"];
87+
assert(x1 == 42);
88+
8789
long x2 = myObject["x2"];
90+
assert(x2 == 42);
91+
8892
unsigned long x3 = myObject["x3"];
93+
assert(x3 == 42);
8994

9095
Serial.print("myObject.keys() = ");
9196
Serial.println(myObject.keys());
@@ -127,4 +132,4 @@ void demoCreation() {
127132

128133
Serial.print("myObject = ");
129134
Serial.println(myObject);
130-
}
135+
}

0 commit comments

Comments
 (0)