fysxasteroids/engine/tests/ControllerBaseTests.cc

21 lines
360 B
C++
Raw Normal View History

2010-04-05 23:38:59 +02:00
#include <UnitTest++.h>
#include "ControllerBase.h"
#include "keytable.h"
using namespace std;
using namespace Engine;
TEST (test_convert_keystring) {
int key;
key = convert_keystring ("up");
CHECK_EQUAL (SDLK_UP, key);
key = convert_keystring ("escape");
CHECK_EQUAL (SDLK_ESCAPE, key);
key = convert_keystring ("blaaa");
CHECK_EQUAL (0, key);
}