blob: 3d48a369dfc74e3370001fee2690035d31cc342f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
JSON = function () {
return {
stringify: function stringify(value, whitelist) {
switch (typeof(value)) {
case "object":
return value.constructor.name;
}
}
};
}();
function missingArgTest2() {
var testPairs = [
["{}", {}],
["[]", []],
['{"foo":"bar"}', {"foo":"bar"}],
]
var a = [];
for (var i=0; i < testPairs.length; i++) {
var s = JSON.stringify(testPairs[i][1])
a[i] = s;
}
return a.join(",");
}
assertEq(missingArgTest2(), "Object,Array,Object");
|