[Chore] (MG_Test/Program): add test prints

This commit is contained in:
2025-08-14 15:45:47 +08:00
parent fc74360fd2
commit a4556a3742
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -48,4 +48,4 @@ jobs:
- name: Test
working-directory: ${{env.TEST_ROOT}}/build-test
run: ctest
run: ctest -V
+7
View File
@@ -95,16 +95,23 @@ TEST_F(ProgramTest, CompileFragment) {
TEST_F(ProgramTest, CompileAndLink) {
GLuint vs = CreateShader(GL_VERTEX_SHADER);
ShaderSource(vs, 1, &vsSrc, NULL);
printf("Compiling vertex shader: %s\n", vsSrc);
CompileShader(vs);
printf("Compiled vertex shader.\n");
GLuint fs = CreateShader(GL_FRAGMENT_SHADER);
ShaderSource(fs, 1, &fsSrc, NULL);
printf("Compiling fragment shader: %s\n", fsSrc);
CompileShader(fs);
printf("Compiled fragment shader.\n");
GLuint program = CreateProgram();
AttachShader(program, vs);
AttachShader(program, fs);
printf("Linking program...\n");
LinkProgram(program);
printf("Program linked...\n");
EXPECT_EQ(GetUniformLocation(program, "ProjMat"), 0);
EXPECT_EQ(GetUniformLocation(program, "Gray"), 1);
EXPECT_EQ(GetUniformLocation(program, "Saturation"), 6);