Test handling of simple expressions
()
| 367 | |
| 368 | |
| 369 | def test_empty_expressions(): |
| 370 | """Test handling of simple expressions""" |
| 371 | counter = SimpleExprCounter() |
| 372 | |
| 373 | # Test with just a variable |
| 374 | x = Var("x", dtype="int32") |
| 375 | counter.visit_expr(x) |
| 376 | |
| 377 | assert counter.var_count == 1 |
| 378 | |
| 379 | # Test with just a constant |
| 380 | counter = SimpleExprCounter() |
| 381 | const = IntImm("int32", 5) |
| 382 | counter.visit_expr(const) |
| 383 | |
| 384 | # Constants don't increase var_count |
| 385 | assert counter.var_count == 0 |
| 386 | |
| 387 | |
| 388 | def test_stmt_mutator(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…