Files
aego/modules/render2d/postprocess_docs_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

28 lines
648 B
Go

package render2d
import (
"os"
"slices"
"testing"
"aego/engine/module"
"aego/engine/problems"
"aego/scene/sceneio"
)
func TestPostProcessDiagnosticExample(t *testing.T) {
f := lightingTestWorld(t)
data, err := os.ReadFile("res/docs/diagnostics/PFX001.aescene")
if err != nil {
t.Fatal(err)
}
s, _, err := sceneio.Load(data, "PFX001.aescene", f.s.Types(), nil, sceneio.LoadOptions{KeepIDs: true})
if err != nil {
t.Fatal(err)
}
ds := module.ValidateScene(s, nil)
if !slices.ContainsFunc(ds, func(d problems.Diagnostic) bool { return d.Code == "PFX001" }) {
t.Fatalf("documented example did not produce PFX001: %+v", ds)
}
}