constants.js (409B)
1 function testConstants(objects, constants, msg) { 2 objects.forEach(function(arr) { 3 var o = arr[0], desc = arr[1]; 4 test(function() { 5 constants.forEach(function(d) { 6 assert_true(d[0] in o, "Object " + o + " doesn't have " + d[0]) 7 assert_equals(o[d[0]], d[1], "Object " + o + " value for " + d[0] + " is wrong") 8 }) 9 }, "Constants for " + msg + " on " + desc + ".") 10 }) 11 }