Web Inspector: add InspectorTest.expectException() and use it
[WebKit-https.git] / LayoutTests / inspector / unit-tests / test-harness-expect-functions-expected.txt
1 Testing TestHarness.expect* family of functions.
2
3
4 == Running test suite: InspectorTest.ExpectFunctions.Sync
5 -- Running test case: InspectorTest.expectThat
6 Expected to PASS
7 PASS: expectThat(true)
8 PASS: expectThat(1)
9 PASS: expectThat("abc")
10 PASS: expectThat({})
11 PASS: expectThat([])
12 Expected to FAIL
13 FAIL: expectThat(false)
14     Expected: truthy
15     Actual: false
16 FAIL: expectThat(0)
17     Expected: truthy
18     Actual: 0
19 FAIL: expectThat("")
20     Expected: truthy
21     Actual: ""
22 FAIL: expectThat(null)
23     Expected: truthy
24     Actual: null
25 FAIL: expectThat(undefined)
26     Expected: truthy
27     Actual: undefined
28 FAIL: expectThat(NaN)
29     Expected: truthy
30     Actual: NaN
31
32 -- Running test case: InspectorTest.expectFalse
33 Expected to PASS
34 PASS: expectFalse(false)
35 PASS: expectFalse(0)
36 PASS: expectFalse("")
37 PASS: expectFalse(null)
38 PASS: expectFalse(undefined)
39 PASS: expectFalse(NaN)
40 Expected to FAIL
41 FAIL: expectFalse(true)
42     Expected: falsey
43     Actual: true
44 FAIL: expectFalse(1)
45     Expected: falsey
46     Actual: 1
47 FAIL: expectFalse("abc")
48     Expected: falsey
49     Actual: "abc"
50 FAIL: expectFalse({})
51     Expected: falsey
52     Actual: {}
53 FAIL: expectFalse([])
54     Expected: falsey
55     Actual: []
56
57 -- Running test case: InspectorTest.expectNull
58 Expected to PASS
59 PASS: expectNull(null)
60 Expected to FAIL
61 FAIL: expectNull(true)
62     Expected: null
63     Actual: true
64 FAIL: expectNull(false)
65     Expected: null
66     Actual: false
67 FAIL: expectNull(1)
68     Expected: null
69     Actual: 1
70 FAIL: expectNull("")
71     Expected: null
72     Actual: ""
73 FAIL: expectNull(undefined)
74     Expected: null
75     Actual: undefined
76 FAIL: expectNull({})
77     Expected: null
78     Actual: {}
79 FAIL: expectNull([])
80     Expected: null
81     Actual: []
82
83 -- Running test case: InspectorTest.expectNotNull
84 Expected to PASS
85 PASS: expectNotNull(true)
86 PASS: expectNotNull(false)
87 PASS: expectNotNull(1)
88 PASS: expectNotNull("")
89 PASS: expectNotNull(undefined)
90 PASS: expectNotNull({})
91 PASS: expectNotNull([])
92 Expected to FAIL
93 FAIL: expectNotNull(null)
94     Expected: not null
95     Actual: null
96
97 -- Running test case: InspectorTest.expectEqual
98 Expected to PASS
99 PASS: expectEqual(true, true)
100 PASS: expectEqual({"a":1,"b":2}, {"a":1,"b":2})
101 PASS: expectEqual(CSSStyleDeclaration instance #1, CSSStyleDeclaration instance #1)
102 PASS: expectEqual(1.23, 1.23)
103 PASS: expectEqual("abc", "abc")
104 PASS: expectEqual(null, null)
105 PASS: expectEqual(undefined, undefined)
106 Expected to FAIL
107 FAIL: expectEqual(true, false)
108     Expected: false
109     Actual: true
110 FAIL: expectEqual({"a":1,"b":2}, {"a":1,"b":2})
111     Expected: {"a":1,"b":2}
112     Actual: {"a":1,"b":2}
113 FAIL: expectEqual(CSSStyleDeclaration instance #1, CSSRule instance #2)
114     Expected: CSSRule instance #2
115     Actual: CSSStyleDeclaration instance #1
116 FAIL: expectEqual(1.23, 4.56)
117     Expected: 4.56
118     Actual: 1.23
119 FAIL: expectEqual("abc", "def")
120     Expected: "def"
121     Actual: "abc"
122 FAIL: expectEqual(null, undefined)
123     Expected: undefined
124     Actual: null
125 FAIL: expectEqual(NaN, NaN)
126     Expected: NaN
127     Actual: NaN
128 FAIL: expectEqual({}, {})
129     Expected: {}
130     Actual: {}
131 FAIL: expectEqual([], [])
132     Expected: []
133     Actual: []
134
135 -- Running test case: InspectorTest.expectNotEqual
136 Expected to PASS
137 PASS: expectNotEqual(true, false)
138 PASS: expectNotEqual({"a":1,"b":2}, {"a":1,"b":2})
139 PASS: expectNotEqual(CSSStyleDeclaration instance #1, CSSRule instance #2)
140 PASS: expectNotEqual(1.23, 4.56)
141 PASS: expectNotEqual("abc", "def")
142 PASS: expectNotEqual(null, undefined)
143 PASS: expectNotEqual(NaN, NaN)
144 PASS: expectNotEqual({}, {})
145 PASS: expectNotEqual([], [])
146 Expected to FAIL
147 FAIL: expectNotEqual(true, true)
148     Expected: not true
149     Actual: true
150 FAIL: expectNotEqual({"a":1,"b":2}, {"a":1,"b":2})
151     Expected: not {"a":1,"b":2}
152     Actual: {"a":1,"b":2}
153 FAIL: expectNotEqual(CSSStyleDeclaration instance #1, CSSStyleDeclaration instance #1)
154     Expected: not CSSStyleDeclaration instance #1
155     Actual: CSSStyleDeclaration instance #1
156 FAIL: expectNotEqual(1.23, 1.23)
157     Expected: not 1.23
158     Actual: 1.23
159 FAIL: expectNotEqual("abc", "abc")
160     Expected: not "abc"
161     Actual: "abc"
162 FAIL: expectNotEqual(null, null)
163     Expected: not null
164     Actual: null
165 FAIL: expectNotEqual(undefined, undefined)
166     Expected: not undefined
167     Actual: undefined
168
169 -- Running test case: InspectorTest.expectShallowEqual
170 Expected to PASS
171 PASS: expectShallowEqual({"a":1,"b":2}, {"a":1,"b":2})
172 PASS: expectShallowEqual({}, {})
173 PASS: expectShallowEqual([1,2], [1,2])
174 PASS: expectShallowEqual([{"a":1},{"a":2}], [{"a":1},{"a":2}])
175 PASS: expectShallowEqual([{}], [{}])
176 PASS: expectShallowEqual([], [])
177 Expected to FAIL
178 FAIL: expectShallowEqual({"a":1,"b":2}, {"a":3,"b":4})
179     Expected: {"a":3,"b":4}
180     Actual: {"a":1,"b":2}
181 FAIL: expectShallowEqual({}, [])
182     Expected: []
183     Actual: {}
184 FAIL: expectShallowEqual([1,2], [3,4])
185     Expected: [3,4]
186     Actual: [1,2]
187 FAIL: expectShallowEqual([{"a":1},{"a":2}], [{"a":3},{"a":4}])
188     Expected: [{"a":3},{"a":4}]
189     Actual: [{"a":1},{"a":2}]
190 FAIL: expectShallowEqual([{"a":1},{"a":2}], [{"b":1},{"b":2}])
191     Expected: [{"b":1},{"b":2}]
192     Actual: [{"a":1},{"a":2}]
193
194 -- Running test case: InspectorTest.expectNotShallowEqual
195 Expected to PASS
196 PASS: expectNotShallowEqual({"a":1,"b":2}, {"a":3,"b":4})
197 PASS: expectNotShallowEqual({}, [])
198 PASS: expectNotShallowEqual([1,2], [3,4])
199 PASS: expectNotShallowEqual([{"a":1},{"a":2}], [{"a":3},{"a":4}])
200 PASS: expectNotShallowEqual([{"a":1},{"a":2}], [{"b":1},{"b":2}])
201 Expected to FAIL
202 FAIL: expectNotShallowEqual({"a":1,"b":2}, {"a":1,"b":2})
203     Expected: not {"a":1,"b":2}
204     Actual: {"a":1,"b":2}
205 FAIL: expectNotShallowEqual({}, {})
206     Expected: not {}
207     Actual: {}
208 FAIL: expectNotShallowEqual([1,2], [1,2])
209     Expected: not [1,2]
210     Actual: [1,2]
211 FAIL: expectNotShallowEqual([{"a":1},{"a":2}], [{"a":1},{"a":2}])
212     Expected: not [{"a":1},{"a":2}]
213     Actual: [{"a":1},{"a":2}]
214 FAIL: expectNotShallowEqual([{}], [{}])
215     Expected: not [{}]
216     Actual: [{}]
217 FAIL: expectNotShallowEqual([], [])
218     Expected: not []
219     Actual: []
220
221 -- Running test case: InspectorTest.expectEqualWithAccuracy
222 Expected to PASS
223 PASS: expectEqualWithAccuracy(0, 0, 0)
224 PASS: expectEqualWithAccuracy(0, 0, 1)
225 PASS: expectEqualWithAccuracy(0, 1, 1)
226 PASS: expectEqualWithAccuracy(1, 0, 1)
227 Expected to FAIL
228 FAIL: expectEqualWithAccuracy(0, 2, 1)
229     Expected: 2 +/- 1
230     Actual: 0
231 FAIL: expectEqualWithAccuracy(2, 0, 1)
232     Expected: 0 +/- 1
233     Actual: 2
234
235 -- Running test case: InspectorTest.expectLessThan
236 Expected to PASS
237 PASS: expectLessThan(0, 1)
238 PASS: expectLessThan("abc", "def")
239 Expected to FAIL
240 FAIL: expectLessThan(0, 0)
241     Expected: less than 0
242     Actual: 0
243 FAIL: expectLessThan(1, 0)
244     Expected: less than 0
245     Actual: 1
246 FAIL: expectLessThan("abc", "abc")
247     Expected: less than "abc"
248     Actual: "abc"
249 FAIL: expectLessThan("def", "abc")
250     Expected: less than "abc"
251     Actual: "def"
252
253 -- Running test case: InspectorTest.expectLessThanOrEqual
254 Expected to PASS
255 PASS: expectLessThanOrEqual(0, 1)
256 PASS: expectLessThanOrEqual(0, 0)
257 PASS: expectLessThanOrEqual("abc", "def")
258 PASS: expectLessThanOrEqual("abc", "abc")
259 Expected to FAIL
260 FAIL: expectLessThanOrEqual(1, 0)
261     Expected: less than or equal to 0
262     Actual: 1
263 FAIL: expectLessThanOrEqual("def", "abc")
264     Expected: less than or equal to "abc"
265     Actual: "def"
266
267 -- Running test case: InspectorTest.expectGreaterThan
268 Expected to PASS
269 PASS: expectGreaterThan(1, 0)
270 PASS: expectGreaterThan("def", "abc")
271 Expected to FAIL
272 FAIL: expectGreaterThan(0, 0)
273     Expected: greater than 0
274     Actual: 0
275 FAIL: expectGreaterThan(0, 1)
276     Expected: greater than 1
277     Actual: 0
278 FAIL: expectGreaterThan("abc", "abc")
279     Expected: greater than "abc"
280     Actual: "abc"
281 FAIL: expectGreaterThan("abc", "def")
282     Expected: greater than "def"
283     Actual: "abc"
284
285 -- Running test case: InspectorTest.expectGreaterThanOrEqual
286 Expected to PASS
287 PASS: expectGreaterThanOrEqual(1, 0)
288 PASS: expectGreaterThanOrEqual(0, 0)
289 PASS: expectGreaterThanOrEqual("def", "abc")
290 PASS: expectGreaterThanOrEqual("abc", "abc")
291 Expected to FAIL
292 FAIL: expectGreaterThanOrEqual(0, 1)
293     Expected: greater than or equal to 1
294     Actual: 0
295 FAIL: expectGreaterThanOrEqual("abc", "def")
296     Expected: greater than or equal to "def"
297     Actual: "abc"
298