54 int nbWrongScripts = 0;
64 ASSERT_TRUE(
false) <<
"Failed to parse needed scripts for type: " <<
type <<
" and id " <<
name;
68 ASSERT_TRUE(nbWrongScripts == 0);
81 ASSERT_TRUE(window !=
nullptr);
82 ASSERT_TRUE(stringBehaviour !=
nullptr);
84 for (node = window->
firstChild; node !=
nullptr; node = node->
next) {
96 isGreen = node->
color[0] < 0.1 && node->
color[1] > 0.9 && node->
color[2] < 0.1;
97 isRed = node->
color[0] > 0.9 && node->
color[1] < 0.1 && node->
color[2] < 0.1;
103 const char* message =
va(
"%s.%s failed.", windowName, node->
name);
104 ASSERT_TRUE(
false) << message <<
" base/ufos/uitest/" << windowName <<
".ufo";
106 const char* message =
va(
"%s.%s have an unknown status.", windowName, node->
name);
107 ASSERT_TRUE(
false) << message <<
" base/ufos/uitest/" << windowName <<
".ufo";
125 for (
int i = 0;
i < 20;
i++) {
143 ASSERT_TRUE(behaviour !=
nullptr);
144 ASSERT_STREQ(behaviour->
name,
"button");
148 ASSERT_TRUE(behaviour !=
nullptr);
152 ASSERT_TRUE(behaviour !=
nullptr);
153 ASSERT_STREQ(behaviour->
name,
"zone");
157 ASSERT_TRUE(behaviour ==
nullptr);
void CL_InitLua(void)
Initializes the ui-lua interfacing environment.
bool CL_ParseClientData(const char *type, const char *name, const char **text)
Called at client startup.
memPool_t * vid_imagePool
Listener for cvar changes.
static void SetUpTestCase()
static void TearDownTestCase()
void Cmd_ExecuteString(const char *text,...)
A complete command line has been parsed, so try to execute it.
void Cbuf_Execute(void)
Pulls off terminated lines of text from the command buffer and sends them through Cmd_ExecuteString...
void Com_Printf(const char *const fmt,...)
char * FS_NextScriptHeader(const char *files, const char **name, const char **text)
int FS_BuildFileList(const char *fileList)
Build a filelist.
#define Mem_CreatePool(name)
QGL_EXTERN GLint GLenum type
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
char const * Q_strstart(char const *str, char const *start)
Matches the start of a string.
const char * va(const char *format,...)
does a varargs printf into a temp buffer, so I don't need to have varargs versions of all text functi...
node behaviour, how a node work
Atomic structure used to define most of the UI.
uiBehaviour_t * behaviour
static void UFO_ExecuteTestWindow(const char *windowName)
Parse and execute a test windows.
static void UFO_AnalyseTestWindow(const char *windowName)
after execution of a unittest window, it analyse color of normalized indicator, and create asserts....
static void TEST_ParseScript(const char *scriptName)
TEST_F(UILevel2Test, KnownBehaviours)
test behaviour name
Internal data use by the UI package.
void UI_Shutdown(void)
Reset and free the UI data hunk.
uiBehaviour_t * UI_GetNodeBehaviour(const char *name)
Return a node behaviour by name.
uiNode_t * UI_GetWindow(const char *name)
Searches all windows for the specified one.