UFO: Alien Invasion
Loading...
Searching...
No Matches
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"
Include dependency graph for test_parser.cpp:

Go to the source code of this file.

Data Structures

class  ParserTest

Functions

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

Detailed Description

Test cases for code about shared parser.

Definition in file test_parser.cpp.

Function Documentation

◆ TEST_F() [1/10]

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() [2/10]

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(), 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() [3/10]

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() [4/10]

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().

◆ TEST_F() [5/10]

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() [6/10]

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() [7/10]

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() [8/10]

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() [9/10]

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() [10/10]

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.