21 lines
360 B
C++
21 lines
360 B
C++
|
#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);
|
||
|
}
|
||
|
|