1 #define GTEST_HAS_EXCEPTIONS 0
4 #include <SDL/SDL_error.h>
5 #include <SDL/SDL_video.h>
9 #include "gtest/gtest.h"
11 int main(int argc, char **argv) {
12 // Set up an OpenGL context using SDL.
13 if (SDL_Init(SDL_INIT_VIDEO) == -1) {
14 fprintf(stderr, "SDL_Init failed: %s\n", SDL_GetError());
17 SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 0);
18 SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 0);
19 SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
20 SDL_SetVideoMode(32, 32, 0, SDL_OPENGL);
21 SDL_WM_SetCaption("OpenGL window for unit test", NULL);
23 testing::InitGoogleTest(&argc, argv);
24 int err = RUN_ALL_TESTS();