UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
test_parser.cpp File Reference

Test cases for code about shared parser. More...

#include "test_shared.h"
#include "../shared/ufotypes.h"
#include "../shared/parse.h"

Go to the source code of this file.

Data Structures

class  ParserTest
 

Functions

 TEST_F (ParserTest, Parser)
 unittest around default use of parser More...
 
 TEST_F (ParserTest, ParserWithEntity)
 unittest to check back slash entity conversion More...
 
 TEST_F (ParserTest, ParserWithUnParse)
 unittest around default use of parser More...
 
 TEST_F (ParserTest, ParserWithFunctionScriptToken)
 unittest around default use of parser More...
 
 TEST_F (ParserTest, ParserCommonType)
 unittest around common type More...
 
 TEST_F (ParserTest, ParserListOk)
 unittest to check well formed list More...
 
 TEST_F (ParserTest, ParserListOkEmpty)
 unittest to check well formed empty list More...
 
 TEST_F (ParserTest, ParserListKoEOF)
 unittest to check wrong list with EOF More...
 
 TEST_F (ParserTest, ParserListKoWrongToken)
 unittest to check wrong list with unexpected token More...
 
 TEST_F (ParserTest, ParserListKoNewList)
 unittest to check wrong list which contains another sublist More...
 

Detailed Description

Test cases for code about shared parser.

Definition in file test_parser.cpp.

Function Documentation

TEST_F ( ParserTest  ,
Parser   
)

unittest around default use of parser

Definition at line 44 of file test_parser.cpp.

References Com_GetType(), Com_Parse(), TT_EOF, and TT_QUOTED_WORD.

TEST_F ( ParserTest  ,
ParserWithEntity   
)

unittest to check back slash entity conversion

Definition at line 86 of file test_parser.cpp.

References Com_GetType(), Com_Parse(), and TT_QUOTED_WORD.

TEST_F ( ParserTest  ,
ParserWithUnParse   
)

unittest around default use of parser

Definition at line 104 of file test_parser.cpp.

References Com_GetType(), Com_Parse(), Com_UnParseLastToken(), and TT_QUOTED_WORD.

TEST_F ( ParserTest  ,
ParserWithFunctionScriptToken   
)

unittest around default use of parser

Definition at line 162 of file test_parser.cpp.

References Com_GetType(), Com_Parse(), TT_BEGIN_BLOCK, TT_BEGIN_LIST, TT_COMMA, TT_END_BLOCK, TT_END_LIST, TT_EOF, TT_QUOTED_WORD, and TT_WORD.

TEST_F ( ParserTest  ,
ParserCommonType   
)

unittest around common type

Todo:
V_POS
Todo:
V_VECTOR
Todo:
V_COLOR
Todo:
V_STRING
Todo:
V_TRANSLATION_STRING
Todo:
V_LONGSTRING

Definition at line 220 of file test_parser.cpp.

References ALIGN_CC, BLEND_BLEND, Com_ParseValue(), f, FADE_SIN, RESULT_ERROR, RESULT_OK, STYLE_ROTATED, V_ALIGN, V_BLEND, V_BOOL, V_FADE, V_FLOAT, V_INT, and V_STYLE.

TEST_F ( ParserTest  ,
ParserListOk   
)

unittest to check well formed list

Definition at line 346 of file test_parser.cpp.

References Com_ParseList(), linkedList_t::data, LIST_Count(), LIST_Delete(), and linkedList_t::next.

TEST_F ( ParserTest  ,
ParserListOkEmpty   
)

unittest to check well formed empty list

Definition at line 367 of file test_parser.cpp.

References Com_ParseList(), and LIST_Count().

TEST_F ( ParserTest  ,
ParserListKoEOF   
)

unittest to check wrong list with EOF

Definition at line 385 of file test_parser.cpp.

References Com_ParseList().

TEST_F ( ParserTest  ,
ParserListKoWrongToken   
)

unittest to check wrong list with unexpected token

Definition at line 397 of file test_parser.cpp.

References Com_ParseList().

TEST_F ( ParserTest  ,
ParserListKoNewList   
)

unittest to check wrong list which contains another sublist

Definition at line 409 of file test_parser.cpp.

References Com_ParseList().