blob: ba8109145bce7c594aeb9a7bcb5fdbc7126ef87f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
This test covers the correctness and behaviour of switch statements.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS characterSwitch('A' + emptyString1) is "A"
PASS characterSwitch('A' + emptyString1 + emptyString2) is "A"
PASS characterSwitch(emptyString1 + emptyString2) is "default"
PASS characterSwitch('\0') is "\0"
PASS characterSwitch('A') is "A"
PASS characterSwitch('a') is "a"
PASS characterSwitch('1') is "1"
PASS characterSwitch('-1') is "default"
PASS characterSwitch('B') is "B"
PASS characterSwitch('') is "default"
PASS characterSwitch({toString: function(){return 'B'}}) is "default"
PASS characterSwitch(0) is "default"
PASS characterSwitch(-0) is "default"
PASS characterSwitch(1) is "default"
PASS characterSwitch(1.1) is "default"
PASS characterSwitch(-1) is "default"
PASS characterSwitch(-1000000000) is "default"
PASS characterSwitch(1000000000) is "default"
PASS characterSwitch({}) is "default"
PASS sparseCharacterSwitch('\0') is "\0"
PASS sparseCharacterSwitch('A') is "A"
PASS sparseCharacterSwitch('a') is "a"
PASS sparseCharacterSwitch('1') is "1"
PASS sparseCharacterSwitch('-1') is "default"
PASS sparseCharacterSwitch('B') is "B"
PASS sparseCharacterSwitch('') is ""
PASS sparseCharacterSwitch({toString: function(){return 'B'}}) is "default"
PASS sparseCharacterSwitch(0) is "default"
PASS sparseCharacterSwitch(-0) is "default"
PASS sparseCharacterSwitch(1) is "default"
PASS sparseCharacterSwitch(1.1) is "default"
PASS sparseCharacterSwitch(-1) is "default"
PASS sparseCharacterSwitch(-1000000000) is "default"
PASS sparseCharacterSwitch(1000000000) is "default"
PASS sparseCharacterSwitch({}) is "default"
PASS stringSwitch('\0') is "\0"
PASS stringSwitch('A') is "A"
PASS stringSwitch('a') is "a"
PASS stringSwitch('1') is "1"
PASS stringSwitch('-1') is "-1"
PASS stringSwitch('B') is "B"
PASS stringSwitch('') is ""
PASS stringSwitch('some string') is "some string"
PASS stringSwitch({toString: function(){return 'some string'}}) is "default"
PASS stringSwitch('s') is "default"
PASS stringSwitch(0) is "default"
PASS stringSwitch(-0) is "default"
PASS stringSwitch(1) is "default"
PASS stringSwitch(1.1) is "default"
PASS stringSwitch(-1) is "default"
PASS stringSwitch(-1000000000) is "default"
PASS stringSwitch(1000000000) is "default"
PASS stringSwitch({}) is "default"
PASS numberSwitch('\0') is "default"
PASS numberSwitch('A') is "default"
PASS numberSwitch('a') is "default"
PASS numberSwitch('1') is "default"
PASS numberSwitch('-1') is "default"
PASS numberSwitch('B') is "default"
PASS numberSwitch('') is "default"
PASS numberSwitch('some string') is "default"
PASS numberSwitch({valueOf: function(){return 0}}) is "default"
PASS numberSwitch('s') is "default"
PASS numberSwitch(0) is 0
PASS numberSwitch(-0) is 0
PASS numberSwitch(1) is 1
PASS numberSwitch(1.1) is "default"
PASS numberSwitch(-1) is -1
PASS numberSwitch(-1000000000) is "default"
PASS numberSwitch(1000000000) is "default"
PASS numberSwitch({}) is "default"
PASS sparseNumberSwitch('\0') is "default"
PASS sparseNumberSwitch('A') is "default"
PASS sparseNumberSwitch('a') is "default"
PASS sparseNumberSwitch('1') is "default"
PASS sparseNumberSwitch('-1') is "default"
PASS sparseNumberSwitch('B') is "default"
PASS sparseNumberSwitch('') is "default"
PASS sparseNumberSwitch('some string') is "default"
PASS sparseNumberSwitch({valueOf: function(){return 0}}) is "default"
PASS sparseNumberSwitch('s') is "default"
PASS sparseNumberSwitch(0) is 0
PASS sparseNumberSwitch(-0) is 0
PASS sparseNumberSwitch(1) is 1
PASS sparseNumberSwitch(1.1) is "default"
PASS sparseNumberSwitch(-1) is -1
PASS sparseNumberSwitch(-1000000000) is -1000000000
PASS sparseNumberSwitch(1000000000) is 1000000000
PASS sparseNumberSwitch({}) is "default"
PASS generalSwitch('\0') is "\0"
PASS generalSwitch('A') is "A"
PASS generalSwitch('a') is "a"
PASS generalSwitch('1') is "1"
PASS generalSwitch('-1') is "-1"
PASS generalSwitch('B') is "B"
PASS generalSwitch('') is ""
PASS generalSwitch('some string') is "some string"
PASS generalSwitch({valueOf: function(){return 0}}) is "default"
PASS generalSwitch('s') is "default"
PASS generalSwitch(0) is 0
PASS generalSwitch(-0) is 0
PASS generalSwitch(1) is 1
PASS generalSwitch(1.1) is "default"
PASS generalSwitch(-1) is -1
PASS generalSwitch(-1000000000) is -1000000000
PASS generalSwitch(1000000000) is 1000000000
PASS generalSwitch({}) is "default"
PASS successfullyParsed is true
TEST COMPLETE
|