blob: 1d958ab37d113ef0f0e8a712ee98530da0baf585 [file] [log] [blame]
oliver@apple.com6bfc34a2008-07-21 01:37:38 +00001This test exercises the source expression offset information that is attached to exception objects for the inspector.
2
3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
4
5
6
7Testing 'undefined.a++'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +00008PASS ex.message is "undefined is not an object (evaluating 'undefined.a')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +00009
10Testing '++undefined.a'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000011PASS ex.message is "undefined is not an object (evaluating 'undefined.a')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000012
13Testing 'undefined[0]++'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000014PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000015
16Testing '++undefined[1]'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000017PASS ex.message is "undefined is not an object (evaluating 'undefined[1]')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000018
19Testing 'undefined.b'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000020PASS ex.message is "undefined is not an object (evaluating 'undefined.b')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000021
22Testing 'undefined[0]'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000023PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000024
25Testing 'undefined.b += 1'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000026PASS ex.message is "undefined is not an object (evaluating 'undefined.b')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000027
28Testing 'undefined[0] += 1'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000029PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000030
31Testing 'undefined()'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000032PASS ex.message is "undefined is not a function. (In 'undefined()', 'undefined' is undefined)"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000033
34Testing 'new undefined()'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000035PASS ex.message is "undefined is not a constructor (evaluating 'new undefined()')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000036
37Testing '({}).b()'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000038PASS ex.message is "({}).b is not a function. (In '({}).b()', '({}).b' is undefined)"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000039
40Testing 'new {}.b()'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000041PASS ex.message is "undefined is not a constructor (evaluating 'new {}.b()')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000042
43Testing '1()'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000044PASS ex.message is "1 is not a function. (In '1()', '1' is 1)"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000045
46Testing 'new 1()'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000047PASS ex.message is "1 is not a constructor (evaluating 'new 1()')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000048
49Testing 'throw { message : 'thrown object' }'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000050PASS ex.message is "thrown object"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000051
52Testing '1 in undefined'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000053PASS ex.message is "undefined is not an Object. (evaluating '1 in undefined')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000054
55Testing '1 instanceof undefined'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000056PASS ex.message is "Right hand side of instanceof is not an object"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000057
58Testing 'for (undefined.b in [1]) {}'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000059PASS ex.message is "undefined is not an object (evaluating 'undefined.b')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000060
61Testing 'for (undefined[0] in [1]) {}'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000062PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000063
64Testing 'undefined.a = 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000065PASS ex.message is "undefined is not an object (evaluating 'undefined.a = 5')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000066
67Testing 'undefined[0] = 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000068PASS ex.message is "undefined is not an object (evaluating 'undefined[0] = 5')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000069
70Testing '({b:undefined}).b.a = 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000071PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b.a = 5')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000072
73Testing '({b:undefined}).b[0] = 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000074PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b[0] = 5')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000075
76Testing 'undefined.a += 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000077PASS ex.message is "undefined is not an object (evaluating 'undefined.a')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000078
79Testing 'undefined[0] += 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000080PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000081
82Testing '({b:undefined}).b.a += 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000083PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b.a')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +000084
85Testing '({b:undefined}).b[0] += 5'
commit-queue@webkit.org31924df2016-10-14 06:31:40 +000086PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b[0]')"
87
88Testing '[].a.b.x'
89PASS ex.message is "undefined is not an object (evaluating '[].a.b')"
90
91Testing '[]['a']['b'].x'
92PASS ex.message is "undefined is not an object (evaluating '[]['a']['b']')"
93
94Testing '[].a['b'].x'
95PASS ex.message is "undefined is not an object (evaluating '[].a['b']')"
96
97Testing '[]['a'].b.x'
98PASS ex.message is "undefined is not an object (evaluating '[]['a'].b')"
99
100Testing 'func(undefined.x)'
101PASS ex.message is "undefined is not an object (evaluating 'undefined.x')"
102
103Testing 'func(null.x)'
104PASS ex.message is "null is not an object (evaluating 'null.x')"
105
106Testing 'func(undefined[0])'
107PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')"
108
109Testing 'func(null[0])'
110PASS ex.message is "null is not an object (evaluating 'null[0]')"
oliver@apple.com6bfc34a2008-07-21 01:37:38 +0000111PASS successfullyParsed is true
112
113TEST COMPLETE
114