Better test names.
--- a/builtins/Array.prototype.join-order.html Tue Jun 19 15:05:08 2012 +0200
+++ b/builtins/Array.prototype.join-order.html Tue Jun 19 15:57:13 2012 +0200
@@ -23,7 +23,7 @@
});
}, "Array.prototype.join must call ToObject before looking at the separator argument.")
-var generateTest = function(throwing_getter) {
+var generateTest = function(throwing_getter, getter_name) {
var throwing_object = {};
var interfaces = [Boolean, Number];
@@ -41,14 +41,18 @@
assert_throws(test_error, function() {
[].join.call(that, ",");
});
- }, "Array.prototype.join must forward the exception from the this object's length property")
+ }, "Array.prototype.join must forward the exception from the this " +
+ "object's length property with this=" + format_value(that) + " and " +
+ "getter " + getter_name + ".")
test(function() {
assert_throws(test_error, function() {
[].join.call(that, {
toString: function() { assert_unreached(); }
});
});
- }, "Array.prototype.join must get the this object's length property before looking at the separator argument.")
+ }, "Array.prototype.join must get the this object's length property " +
+ "before looking at the separator argument with this=" +
+ format_value(that) + " and getter " + getter_name + ".")
});
interfaces.forEach(function(iface) {
delete iface.length;
@@ -57,7 +61,7 @@
// Step 2.
test(function() {
- generateTest(function() { throw test_error; });
+ generateTest(function() { throw test_error; }, "function");
}, "Step 2.");
// Step 3.
@@ -66,17 +70,17 @@
return {
valueOf: function() { throw test_error; }
};
- });
+ }, "valueOf");
generateTest(function() {
return {
toString: function() { throw test_error; }
};
- });
+ }, "toString");
generateTest(function() {
return {
valueOf: function() { throw test_error; },
toString: function() { assert_notreached("toString should not be invoked if valueOf exists"); }
};
- });
+ }, "valueOf and toString");
}, "Step 3.");
</script>