// BEGIN mycpp output #include "gc_heap.h" using gc_heap::Alloc; using gc_heap::kZeroMask; using gc_heap::StackRoots; #include "my_runtime.h" #include "mylib2.h" using gc_heap::NewStr; using gc_heap::NewList; using gc_heap::NewDict; GLOBAL_STR(str0, "zero"); GLOBAL_STR(str1, "zero"); GLOBAL_STR(str2, "one or two"); GLOBAL_STR(str3, "three or four"); GLOBAL_STR(str4, "default"); GLOBAL_STR(str5, "another"); namespace test_switch { // forward declare } // forward declare namespace test_switch namespace test_switch { // declare void run_tests(); void run_benchmarks(); } // declare namespace test_switch namespace test_switch { // define void run_tests() { int x; x = 5; switch (x) { case 0: { print(str0); print(str1); } break; case 1: case 2: { print(str2); } break; case 3: case 4: { print(str3); } break; default: { print(str4); print(str5); } } } void run_benchmarks() { throw Alloc(); } } // define namespace test_switch