<commit_before>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('') is ""
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) is "default"
PASS characterSwitch(-1000000000) is "default"
PASS characterSwitch(1000000000) is "default"
PASS characterSwitch({}) is "default"
PASS sparseCharacterSwitch('') is ""
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) is "default"
PASS sparseCharacterSwitch(-1000000000) is "default"
PASS sparseCharacterSwitch(1000000000) is "default"
PASS sparseCharacterSwitch({}) is "default"
PASS stringSwitch('') is ""
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) is "default"
PASS stringSwitch(-1000000000) is "default"
PASS stringSwitch(1000000000) is "default"
PASS stringSwitch({}) is "default"
PASS numberSwitch('') 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) is -1
PASS numberSwitch(-1000000000) is "default"
PASS numberSwitch(1000000000) is "default"
PASS numberSwitch({}) is "default"
PASS sparseNumberSwitch('') 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) is -1
PASS sparseNumberSwitch(-1000000000) is -1000000000
PASS sparseNumberSwitch(1000000000) is 1000000000
PASS sparseNumberSwitch({}) is "default"
PASS generalSwitch('') is ""
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) is -1
PASS generalSwitch(-1000000000) is -1000000000
PASS generalSwitch(1000000000) is 1000000000
PASS generalSwitch({}) is "default"
PASS successfullyParsed is true

TEST COMPLETE

<commit_msg>Update the expected file for switch-behaviour to add the new tests that have been added with the fix for WebKit bug 23614.<commit_after>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('') is ""
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('') is ""
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('') is ""
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('') 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('') 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('') is ""
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

{'fraction_non_alphanumeric': 0.13556936789023102, 'fraction_numerical': 0.05289081740354169, 'mean_word_length': 7.435212660731948, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 32, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3756367', 'n_tokens_mistral': 2811, 'n_tokens_neox': 2483, 'n_words': 913}