mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
19 lines
310 B
C++
19 lines
310 B
C++
#include <SDL2/SDL_error.h>
|
|
|
|
#include <SDL2pp/Exception.hh>
|
|
|
|
#include "testing.h"
|
|
|
|
using namespace SDL2pp;
|
|
|
|
BEGIN_TEST(int, char*[])
|
|
SDL_SetError("foo");
|
|
|
|
try {
|
|
throw Exception("");
|
|
} catch (SDL2pp::Exception& e) {
|
|
SDL_SetError("bar");
|
|
EXPECT_EQUAL((std::string)e.GetSDLError(), "foo");
|
|
}
|
|
END_TEST()
|