MCPcopy Index your code
hub / github.com/nodejs/node / test_switches

Function test_switches

deps/v8/test/mjsunit/switch.js:572–593  ·  view source on GitHub ↗
(opt)

Source from the content-addressed store, hash-verified

570// test_switch(clause_type, test_type, feedback, optimize);
571
572function test_switches(opt) {
573 var test_types = ['symbols', 'strings', 'oddball', 'smi', 'heapnum'];
574
575 function test(clause_type) {
576 var values = clause_values[clause_type];
577
578 test_types.forEach(function(test_type) {
579 test_switch(clause_type, test_type, 'all', opt);
580 test_switch(clause_type, test_type, 'none', opt);
581
582 // Targeting specific clause feedback
583 values.forEach(function(value) {
584 test_switch(clause_type, test_type, [value], value, opt);
585 test_switch(clause_type, test_type, value, value, opt);
586 });
587 });
588 };
589
590 test('string');
591 test('smi');
592 test('mixed');
593};
594
595test_switches(false);
596test_switches(true);

Callers 1

switch.jsFile · 0.85

Calls 1

testFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…