Add test case for RWops+Font (issue #94)

This commit is contained in:
Dmitry Marakasov 2017-04-21 17:36:05 +03:00
parent d8c5cfb56e
commit aef47fbfeb

View File

@ -1,8 +1,9 @@
#include <SDL_main.h>
#include <SDL2pp/SDLTTF.hh>
#include <SDL2pp/Font.hh>
#include <SDL2pp/Exception.hh>
#include <SDL2pp/Font.hh>
#include <SDL2pp/RWops.hh>
#include <SDL2pp/SDLTTF.hh>
#include "testing.h"
#include "movetest.hh"
@ -13,6 +14,14 @@ BEGIN_TEST(int, char*[])
SDLTTF ttf;
Font font(TESTDATA_DIR "/Vera.ttf", 30);
// RWops
{
auto rwops = RWops::FromFile(TESTDATA_DIR "/Vera.ttf");
Font font_by_rw(rwops, 30);
EXPECT_TRUE(font_by_rw.Get());
}
MOVE_TEST(Font, font, Get, nullptr);
{