()
| 337 | |
| 338 | ## Graph-wise Matching |
| 339 | def test_simple_used_by(): |
| 340 | with PatternContext() as ctx: |
| 341 | n0 = is_var("x") # x is a free var (fn arg) |
| 342 | n1 = wildcard() |
| 343 | n0 ^ n1 |
| 344 | dfb = main_fn.body.blocks[0] |
| 345 | matched = ctx.match_dfb(dfb) |
| 346 | assert matched |
| 347 | assert matched[n0] == main_fn.params[0] |
| 348 | assert matched[n1] == dfb.bindings[0].var |
| 349 | |
| 350 | |
| 351 | def test_simple_call_tir_edge(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…