mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-05 11:56:00 -04:00
Test SDLImage init
This commit is contained in:
parent
52e142ce57
commit
8e177f6606
@ -3,6 +3,10 @@
|
|||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <SDL2pp/SDL2pp.hh>
|
#include <SDL2pp/SDL2pp.hh>
|
||||||
|
|
||||||
|
#ifdef SDL2PP_WITH_IMAGE
|
||||||
|
# include <SDL2/SDL_image.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "testing.h"
|
#include "testing.h"
|
||||||
#include "movetest.hh"
|
#include "movetest.hh"
|
||||||
|
|
||||||
@ -295,6 +299,15 @@ BEGIN_TEST(int, char*[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SDL2PP_WITH_IMAGE
|
#ifdef SDL2PP_WITH_IMAGE
|
||||||
|
{
|
||||||
|
// Init
|
||||||
|
SDLImage img(IMG_INIT_PNG);
|
||||||
|
EXPECT_EQUAL(img.GetInitFlags(), IMG_INIT_PNG);
|
||||||
|
|
||||||
|
img.InitMore(IMG_INIT_JPG);
|
||||||
|
EXPECT_EQUAL(img.GetInitFlags(), IMG_INIT_PNG | IMG_INIT_JPG);
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// Texture
|
// Texture
|
||||||
renderer.SetDrawColor(0, 0, 0);
|
renderer.SetDrawColor(0, 0, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user