]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/controlFlowProfiler/switch-statements.js
1 load("./driver/driver.js");
4 function testSwitch(s
) {
15 assert(!hasBasicBlockExecuted(testSwitch
, "switch"), "should not have executed yet.");
18 assert(hasBasicBlockExecuted(testSwitch
, "switch"), "should have executed.");
19 assert(hasBasicBlockExecuted(testSwitch
, "return a"), "should have executed.");
20 assert(!hasBasicBlockExecuted(testSwitch
, "return b"), "should not have executed yet.");
21 assert(!hasBasicBlockExecuted(testSwitch
, "return c"), "should not have executed yet.");
24 assert(hasBasicBlockExecuted(testSwitch
, "return b"), "should have executed.");
25 assert(!hasBasicBlockExecuted(testSwitch
, "return c"), "should not have executed yet.");
28 assert(hasBasicBlockExecuted(testSwitch
, "return c"), "should have executed.");