function bytecode(f) { if (typeof disassemble !== "function") return"unavailable"; var d = disassemble(f); return d.slice(d.indexOf("main:"), d.indexOf("\n\n"));
}
function hasGname(f, v, hasIt = true) { // Do a try-catch that prints the full stack, so we can tell // _which_ part of this test failed. try { var b = bytecode(f); if (b != "unavailable") {
assertEq(b.includes(`GetGName "${v}"`), hasIt);
assertEq(b.includes(`GetName "${v}"`), !hasIt);
}
} catch (e) {
print(e.stack); throw e;
}
}