blob: 1100db8ab7bc9adc0e6e4fb6d11ed95a6cec8d95 [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 function. (evaluating '1 instanceof 1').
PASS ({} instanceof 1) threw exception TypeError: 1 is not a function. (evaluating '{} instanceof 1').
PASS (obj instanceof 1) threw exception TypeError: 1 is not a function. (evaluating 'obj instanceof 1').
PASS (1 instanceof {}) threw exception TypeError: {} is not a function. (evaluating '1 instanceof {}').
PASS ({} instanceof {}) threw exception TypeError: {} is not a function. (evaluating '{} instanceof {}').
PASS (obj instanceof {}) threw exception TypeError: {} is not a function. (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