MCPcopy Create free account
hub / github.com/4RH1T3CT0R7/ttf-doom / test_array_write_expr_index

Method test_array_write_expr_index

tests/test_codegen.py:380–390  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

378 assert "WS[]" in fpgm
379
380 def test_array_write_expr_index(self) -> None:
381 src = """\
382var i: int = 0
383array buf[10]
384func test():
385 buf[i] = 99
386"""
387 result = _compile(src)
388 fpgm = result["fpgm"]
389 assert "RS[]" in fpgm # read i
390 assert "WS[]" in fpgm # write buf[i]
391
392
393# ===========================================================================

Callers

nothing calls this directly

Calls 1

_compileFunction · 0.85

Tested by

no test coverage detected