from parser import transpile
from emitter import generate_tbc

def test_bytecode_generation():
    source = """
def process_tensor(a, b):
    x = a * b
    return t_relu(x)
    """
    ir = transpile(source)
    bytecode = generate_tbc(ir)
    print(f"Generated Bytecode: {bytecode}")
    assert bytecode == b"\x02\x03"
    print("Test Passed: Bytecode Generation")

if __name__ == "__main__":
    test_bytecode_generation()
