OLD | NEW |
1 IDL union types unittests | 1 IDL union types unittests |
2 | 2 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | 3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". |
4 | 4 |
5 | 5 |
6 Tests for attributes | 6 Tests for attributes |
7 PASS unionTypesTest.doubleOrStringAttribute is 0 | 7 PASS unionTypesTest.doubleOrStringAttribute is 0 |
8 PASS unionTypesTest.doubleOrStringAttribute is 3.14 | 8 PASS unionTypesTest.doubleOrStringAttribute is 3.14 |
9 PASS unionTypesTest.doubleOrStringAttribute is "foo" | 9 PASS unionTypesTest.doubleOrStringAttribute is "foo" |
10 PASS unionTypesTest.doubleOrStringAttribute is "undefined" | 10 PASS unionTypesTest.doubleOrStringAttribute is "undefined" |
11 PASS unionTypesTest.doubleOrStringAttribute is "null" | 11 PASS unionTypesTest.doubleOrStringAttribute is "null" |
12 PASS unionTypesTest.doubleOrStringAttribute is "[object Object]" | 12 PASS unionTypesTest.doubleOrStringAttribute is "[object Object]" |
13 PASS unionTypesTest.doubleOrStringAttribute is "" | 13 PASS unionTypesTest.doubleOrStringAttribute is "" |
14 | 14 |
15 Tests for method arguments | 15 Tests for method arguments |
16 PASS unionTypesTest.doubleOrStringArg(3.14) is "double is passed: 3.14" | 16 PASS unionTypesTest.doubleOrStringArg(3.14) is "double is passed: 3.14" |
17 PASS unionTypesTest.doubleOrStringArg("foo") is "string is passed: foo" | 17 PASS unionTypesTest.doubleOrStringArg("foo") is "string is passed: foo" |
18 PASS unionTypesTest.doubleOrStringArg(undefined) is "string is passed: undefined
" | 18 PASS unionTypesTest.doubleOrStringArg(undefined) is "string is passed: undefined
" |
19 PASS unionTypesTest.doubleOrStringArg(null) is "string is passed: null" | 19 PASS unionTypesTest.doubleOrStringArg(null) is "string is passed: null" |
20 PASS unionTypesTest.doubleOrStringArg({}) is "string is passed: [object Object]" | 20 PASS unionTypesTest.doubleOrStringArg({}) is "string is passed: [object Object]" |
21 PASS unionTypesTest.doubleOrStringArg([]) is "string is passed: " | 21 PASS unionTypesTest.doubleOrStringArg([]) is "string is passed: " |
22 PASS typeof unionTypesTest.doubleOrStringArg(new Date) is "string" | 22 PASS typeof unionTypesTest.doubleOrStringArg(new Date) is "string" |
23 PASS unionTypesTest.doubleOrStringArg() threw exception TypeError: Failed to exe
cute 'doubleOrStringArg' on 'UnionTypesTest': 1 argument required, but only 0 pr
esent.. | 23 PASS unionTypesTest.doubleOrStringArg() threw exception TypeError: Failed to exe
cute 'doubleOrStringArg' on 'UnionTypesTest': 1 argument required, but only 0 pr
esent.. |
24 | 24 |
| 25 PASS unionTypesTest.doubleOrStringArrayArg([]) is "" |
| 26 PASS unionTypesTest.doubleOrStringArrayArg([3.14, "foo"]) is "double: 3.14, stri
ng: foo" |
| 27 PASS unionTypesTest.doubleOrStringArrayArg([1, "foo", "bar", 2]) is "double: 1,
string: foo, string: bar, double: 2" |
| 28 PASS unionTypesTest.doubleOrStringArrayArg([null, undefined, {}, []]) is "string
: null, string: undefined, string: [object Object], string: " |
| 29 PASS unionTypesTest.doubleOrStringArrayArg(null) threw exception TypeError: Fail
ed to execute 'doubleOrStringArrayArg' on 'UnionTypesTest': The 1st argument is
neither an array, nor does it have indexed properties.. |
| 30 PASS unionTypesTest.doubleOrStringArrayArg(undefined) threw exception TypeError:
Failed to execute 'doubleOrStringArrayArg' on 'UnionTypesTest': The 1st argumen
t is neither an array, nor does it have indexed properties.. |
| 31 PASS unionTypesTest.doubleOrStringArrayArg({}) threw exception TypeError: Failed
to execute 'doubleOrStringArrayArg' on 'UnionTypesTest': The 1st argument is ne
ither an array, nor does it have indexed properties.. |
| 32 |
| 33 PASS unionTypesTest.doubleOrStringSequenceArg([]) is "" |
| 34 PASS unionTypesTest.doubleOrStringSequenceArg([3.14, "foo"]) is "double: 3.14, s
tring: foo" |
| 35 PASS unionTypesTest.doubleOrStringSequenceArg([1, "foo", "bar", 2]) is "double:
1, string: foo, string: bar, double: 2" |
| 36 PASS unionTypesTest.doubleOrStringSequenceArg([null, undefined, {}, []]) is "str
ing: null, string: undefined, string: [object Object], string: " |
| 37 PASS unionTypesTest.doubleOrStringSequenceArg(null) threw exception TypeError: F
ailed to execute 'doubleOrStringSequenceArg' on 'UnionTypesTest': The 1st argume
nt is neither an array, nor does it have indexed properties.. |
| 38 PASS unionTypesTest.doubleOrStringSequenceArg(undefined) threw exception TypeErr
or: Failed to execute 'doubleOrStringSequenceArg' on 'UnionTypesTest': The 1st a
rgument is neither an array, nor does it have indexed properties.. |
| 39 PASS unionTypesTest.doubleOrStringSequenceArg({}) threw exception TypeError: Fai
led to execute 'doubleOrStringSequenceArg' on 'UnionTypesTest': The 1st argument
is neither an array, nor does it have indexed properties.. |
| 40 |
25 Tests for method arguments with defaults | 41 Tests for method arguments with defaults |
26 PASS unionTypesTest.doubleOrStringDefaultDoubleArg() is "double is passed: 3.14" | 42 PASS unionTypesTest.doubleOrStringDefaultDoubleArg() is "double is passed: 3.14" |
27 PASS unionTypesTest.doubleOrStringDefaultDoubleArg(undefined) is "double is pass
ed: 3.14" | 43 PASS unionTypesTest.doubleOrStringDefaultDoubleArg(undefined) is "double is pass
ed: 3.14" |
28 PASS unionTypesTest.doubleOrStringDefaultDoubleArg("foo") is "string is passed:
foo" | 44 PASS unionTypesTest.doubleOrStringDefaultDoubleArg("foo") is "string is passed:
foo" |
29 PASS unionTypesTest.doubleOrStringDefaultStringArg() is "string is passed: foo" | 45 PASS unionTypesTest.doubleOrStringDefaultStringArg() is "string is passed: foo" |
30 PASS unionTypesTest.doubleOrStringDefaultStringArg(undefined) is "string is pass
ed: foo" | 46 PASS unionTypesTest.doubleOrStringDefaultStringArg(undefined) is "string is pass
ed: foo" |
31 PASS unionTypesTest.doubleOrStringDefaultStringArg(3.14) is "double is passed: 3
.14" | 47 PASS unionTypesTest.doubleOrStringDefaultStringArg(3.14) is "double is passed: 3
.14" |
32 PASS unionTypesTest.doubleOrStringDefaultNullArg() is "null is passed" | 48 PASS unionTypesTest.doubleOrStringDefaultNullArg() is "null is passed" |
33 PASS unionTypesTest.doubleOrStringDefaultNullArg(undefined) is "null is passed" | 49 PASS unionTypesTest.doubleOrStringDefaultNullArg(undefined) is "null is passed" |
34 PASS unionTypesTest.doubleOrStringDefaultNullArg(null) is "null is passed" | 50 PASS unionTypesTest.doubleOrStringDefaultNullArg(null) is "null is passed" |
35 PASS unionTypesTest.doubleOrStringDefaultNullArg(3.14) is "double is passed: 3.1
4" | 51 PASS unionTypesTest.doubleOrStringDefaultNullArg(3.14) is "double is passed: 3.1
4" |
36 PASS unionTypesTest.doubleOrStringDefaultNullArg("foo") is "string is passed: fo
o" | 52 PASS unionTypesTest.doubleOrStringDefaultNullArg("foo") is "string is passed: fo
o" |
37 PASS successfullyParsed is true | 53 PASS successfullyParsed is true |
38 | 54 |
39 TEST COMPLETE | 55 TEST COMPLETE |
40 | 56 |
OLD | NEW |