MCPcopy
hub / github.com/EngoEngine/engo / TestShadersInitialization

Function TestShadersInitialization

common/render_shaders_test.go:22–34  ·  view source on GitHub ↗

TestShadersInitialization tests whether all registered `Shader`s will `Setup` without any errors

(t *testing.T)

Source from the content-addressed store, hash-verified

20
21// TestShadersInitialization tests whether all registered `Shader`s will `Setup` without any errors
22func TestShadersInitialization(t *testing.T) {
23 engo.Run(engo.RunOptions{
24 NoRun: true,
25 HeadlessMode: true,
26 }, &testScene{})
27 engo.CreateWindow("", 100, 100, false, 1)
28 defer engo.DestroyWindow()
29
30 w := &ecs.World{}
31 w.AddSystem(&CameraSystem{})
32 err := initShaders(w)
33 assert.NoError(t, err)
34}
35
36// TestShaderCompilation tests whether the `LoadShader` method will indeed report errors iff
37// (one of) the GLSL-shaders is incorrect.

Callers

nothing calls this directly

Calls 4

RunFunction · 0.92
CreateWindowFunction · 0.92
DestroyWindowFunction · 0.92
initShadersFunction · 0.85

Tested by

no test coverage detected