TestMatchCodeGen_EmptyMatch tests handling of empty match expression.
(t *testing.T)
| 329 | |
| 330 | // TestMatchCodeGen_EmptyMatch tests handling of empty match expression. |
| 331 | func TestMatchCodeGen_EmptyMatch(t *testing.T) { |
| 332 | gen := NewMatchCodeGen(nil).(*MatchCodeGen) |
| 333 | result := gen.Generate() |
| 334 | |
| 335 | if len(result.Output) > 0 { |
| 336 | t.Errorf("Expected empty result for nil match, got: %s", string(result.Output)) |
| 337 | } |
| 338 | } |
| 339 | |
| 340 | // TestMatchCodeGen_NoConstructorPatterns tests value switch for non-constructor patterns. |
| 341 | func TestMatchCodeGen_NoConstructorPatterns(t *testing.T) { |
nothing calls this directly
no test coverage detected