blob: 64dacf225697012caaaa24bcd5cd7991650c851e [file] [log] [blame]
This test makes sure that instance of behaves correctly when the value, constructor, or its prototype are immediates.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS (1 instanceof 1) threw exception TypeError: 1 is not a valid argument for 'instanceof' (evaluating '1 instanceof 1').
PASS ({} instanceof 1) threw exception TypeError: 1 is not a valid argument for 'instanceof' (evaluating '{} instanceof 1').
PASS (obj instanceof 1) threw exception TypeError: 1 is not a valid argument for 'instanceof' (evaluating 'obj instanceof 1').
PASS (1 instanceof {}) threw exception TypeError: Object is not a valid argument for 'instanceof' (evaluating '1 instanceof {}').
PASS ({} instanceof {}) threw exception TypeError: Object is not a valid argument for 'instanceof' (evaluating '{} instanceof {}').
PASS (obj instanceof {}) threw exception TypeError: Object is not a valid argument for 'instanceof' (evaluating 'obj instanceof {}').
PASS (1 instanceof Constructor) is false
PASS ({} instanceof Constructor) is false
PASS (obj instanceof Constructor) is true
PASS (1 instanceof Constructor) is false
PASS ({} instanceof Constructor) threw exception TypeError: instanceof called on an object with an invalid prototype property..
PASS (obj instanceof Constructor) threw exception TypeError: instanceof called on an object with an invalid prototype property..
PASS (1 instanceof Constructor) is false
PASS ({} instanceof Constructor) is false
PASS (obj instanceof Constructor) is false
PASS (1 instanceof Constructor) is false
PASS ({} instanceof Constructor) threw exception TypeError: instanceof called on an object with an invalid prototype property..
PASS (obj instanceof Constructor) threw exception TypeError: instanceof called on an object with an invalid prototype property..
PASS successfullyParsed is true
TEST COMPLETE