Files
aego/editor/panels/problems/panel_test.go
sanspie 5eb1832907
ci-platforms / darwin amd64 smoke (push) Skipped
ci / build (amd64, linux, ubuntu-24.04) (push) Failing after 15m28s
ci / release (push) Skipped
ci-platforms / windows amd64 smoke (push) Skipped
ci-platforms / darwin arm64 smoke (push) Skipped
ci / checks (push) Successful in 7m47s
Complete Stage 12 for v0.12.0
2026-11-05 11:46:53 +03:00

25 lines
456 B
Go

package problems
import (
"testing"
"aego/editor/core/context"
)
func TestWhereOmitsUnknownSourcePositions(t *testing.T) {
for _, tt := range []struct {
line, col int
want string
}{
{10, 0, "10"},
{10, -1, "10"},
{10, 4, "10:4"},
{0, 0, ""},
{0, 4, ""},
} {
if got := where(&context.ScriptProblem{Line: tt.line, Col: tt.col}); got != tt.want {
t.Errorf("where(%d, %d) = %q, want %q", tt.line, tt.col, got, tt.want)
}
}
}