UFO: Alien Invasion
|
Test cases for code below common/ and shared/. More...
#include "test_shared.h"
#include "../common/common.h"
#include "../common/sha1.h"
#include "../common/sha2.h"
#include "../common/http.h"
#include "../common/binaryexpressionparser.h"
#include "../shared/utf8.h"
#include "../shared/shared.h"
#include "../shared/parse.h"
#include "../shared/infostring.h"
#include "../shared/stringhunk.h"
#include "../shared/entitiesdef.h"
#include "../ports/system.h"
Go to the source code of this file.
Data Structures | |
class | GenericTest |
Functions | |
static void | STRHUNK_VisitorTestEntry (const char *string) |
static void | STRHUNK_VisitorTestEntry2 (const char *string) |
TEST_F (GenericTest, StringHunks) | |
TEST_F (GenericTest, ConstInt) | |
static int | testListSorter (linkedList_t *entry1, linkedList_t *entry2, const void *userData) |
TEST_F (GenericTest, LinkedList) | |
TEST_F (GenericTest, LinkedListIterator) | |
TEST_F (GenericTest, LinkedListIteratorRemove) | |
TEST_F (GenericTest, PrependStringList) | |
TEST_F (GenericTest, LinkedListStringSort) | |
TEST_F (GenericTest, FileSystemBuildLists) | |
TEST_F (GenericTest, InfoStrings) | |
TEST_F (GenericTest, TokenizeInfoStrings) | |
TEST_F (GenericTest, Cvars) | |
TEST_F (GenericTest, StringCopiers) | |
TEST_F (GenericTest, StringFunctions) | |
TEST_F (GenericTest, HttpHelperFunctions) | |
TEST_F (GenericTest, NetResolv) | |
TEST_F (GenericTest, UnsignedIntToBinary) | |
TEST_F (GenericTest, StringCheckFunctions) | |
TEST_F (GenericTest, EntitiesDef) | |
TEST_F (GenericTest, GetBlock) | |
TEST_F (GenericTest, ComFilePath) | |
TEST_F (GenericTest, MD5File) | |
TEST_F (GenericTest, MD5Buffer) | |
TEST_F (GenericTest, SHA1Buffer) | |
TEST_F (GenericTest, SHA2Buffer) | |
static int | TEST_BEP (const char *id, const void *userdata) |
The string 'a' and 'c' evaluates to true - everything else to false. More... | |
TEST_F (GenericTest, BinaryExpressionParser) | |
Test cases for code below common/ and shared/.
Definition in file test_generic.cpp.
|
static |
Definition at line 52 of file test_generic.cpp.
Referenced by TEST_F().
|
static |
Definition at line 57 of file test_generic.cpp.
Referenced by TEST_F().
The string 'a' and 'c' evaluates to true - everything else to false.
Definition at line 789 of file test_generic.cpp.
References Q_streq.
Referenced by TEST_F().
TEST_F | ( | GenericTest | , |
StringHunks | |||
) |
Definition at line 62 of file test_generic.cpp.
References STRHUNK_Add(), STRHUNK_Create(), STRHUNK_Delete(), STRHUNK_GetFreeSpace(), STRHUNK_Reset(), STRHUNK_Size(), STRHUNK_Visit(), STRHUNK_VisitorTestEntry(), and STRHUNK_VisitorTestEntry2().
TEST_F | ( | GenericTest | , |
ConstInt | |||
) |
Definition at line 97 of file test_generic.cpp.
References Com_GetConstInt(), Com_GetConstVariable(), Com_RegisterConstInt(), Com_RegisterConstList(), Com_UnregisterConstList(), and Com_UnregisterConstVariable().
TEST_F | ( | GenericTest | , |
LinkedList | |||
) |
Definition at line 187 of file test_generic.cpp.
References linkedList_t::data, length, LIST_Add(), LIST_AddString(), LIST_ContainsString(), LIST_CopyStructure(), LIST_Count(), LIST_Delete(), LIST_GetByIdx(), LIST_GetRandom(), LIST_RemoveEntry(), LIST_Sort(), and testListSorter().
TEST_F | ( | GenericTest | , |
LinkedListIterator | |||
) |
Definition at line 237 of file test_generic.cpp.
References LIST_AddString(), LIST_Delete(), and LIST_Foreach.
TEST_F | ( | GenericTest | , |
LinkedListIteratorRemove | |||
) |
Definition at line 264 of file test_generic.cpp.
References Com_Printf(), LIST_AddString(), LIST_Foreach, LIST_IsEmpty(), and LIST_Remove().
TEST_F | ( | GenericTest | , |
PrependStringList | |||
) |
Definition at line 280 of file test_generic.cpp.
References LIST_Delete(), LIST_GetByIdx(), and LIST_PrependString().
TEST_F | ( | GenericTest | , |
LinkedListStringSort | |||
) |
Definition at line 293 of file test_generic.cpp.
References LIST_AddStringSorted(), LIST_Delete(), and LIST_GetByIdx().
TEST_F | ( | GenericTest | , |
FileSystemBuildLists | |||
) |
Definition at line 306 of file test_generic.cpp.
References FS_BuildFileList(), FS_NextFileFromFileList(), and Q_StringSort().
TEST_F | ( | GenericTest | , |
InfoStrings | |||
) |
Definition at line 325 of file test_generic.cpp.
References Info_RemoveKey(), Info_SetValueForKey(), Info_ValueForKey(), and MAX_INFO_STRING.
TEST_F | ( | GenericTest | , |
TokenizeInfoStrings | |||
) |
Definition at line 340 of file test_generic.cpp.
References Cmd_Argv(), Cmd_TokenizeString(), Cvar_Get(), CVAR_USERINFO, Cvar_Userinfo(), DOUBLEQUOTE, MAX_INFO_STRING, PROTOCOL_VERSION, SV_CMD_CONNECT, and va().
TEST_F | ( | GenericTest | , |
Cvars | |||
) |
Definition at line 351 of file test_generic.cpp.
References Cvar_Get(), Cvar_GetString(), CVAR_NOSET, and Cvar_Set().
TEST_F | ( | GenericTest | , |
StringCopiers | |||
) |
Definition at line 358 of file test_generic.cpp.
References Com_Printf(), Com_sprintf(), dest, i, Q_strncpyz(), Sys_Milliseconds(), UTF8_next(), UTF8_strlen(), and UTF8_strncpyz().
TEST_F | ( | GenericTest | , |
StringFunctions | |||
) |
Definition at line 469 of file test_generic.cpp.
References Com_ConvertToASCII7(), length, lengthof, Q_strcat(), Q_strncpyz(), Q_strreplace(), UTF8_char_offset_to_byte_offset(), UTF8_delete_char_at(), and UTF8_insert_char_at().
TEST_F | ( | GenericTest | , |
HttpHelperFunctions | |||
) |
Definition at line 573 of file test_generic.cpp.
References HTTP_ExtractComponents(), and port.
TEST_F | ( | GenericTest | , |
NetResolv | |||
) |
Definition at line 644 of file test_generic.cpp.
References MAX_VAR, and NET_ResolvNode().
TEST_F | ( | GenericTest | , |
UnsignedIntToBinary | |||
) |
Definition at line 651 of file test_generic.cpp.
References Com_ByteToBinary(), and Com_UnsignedIntToBinary().
TEST_F | ( | GenericTest | , |
StringCheckFunctions | |||
) |
Definition at line 672 of file test_generic.cpp.
References Q_strnull(), and Q_strvalid.
TEST_F | ( | GenericTest | , |
EntitiesDef | |||
) |
Definition at line 685 of file test_generic.cpp.
References entityDef_s::classname, ED_Free(), ED_OK, ED_Parse(), entityDefs, FS_FreeFile(), FS_LoadFile(), i, entityDef_s::keyDefs, numEntityDefs, entityDef_s::numKeyDefs, and Q_streq.
TEST_F | ( | GenericTest | , |
GetBlock | |||
) |
Definition at line 719 of file test_generic.cpp.
References Com_GetBlock(), and length.
TEST_F | ( | GenericTest | , |
ComFilePath | |||
) |
Definition at line 737 of file test_generic.cpp.
References Com_FilePath().
TEST_F | ( | GenericTest | , |
MD5File | |||
) |
Definition at line 747 of file test_generic.cpp.
References Com_MD5File(), and Com_Printf().
TEST_F | ( | GenericTest | , |
MD5Buffer | |||
) |
Definition at line 755 of file test_generic.cpp.
References Com_MD5Buffer(), and Com_Printf().
TEST_F | ( | GenericTest | , |
SHA1Buffer | |||
) |
Definition at line 764 of file test_generic.cpp.
References Com_Printf(), and Com_SHA1Buffer().
TEST_F | ( | GenericTest | , |
SHA2Buffer | |||
) |
Definition at line 774 of file test_generic.cpp.
References Com_Printf(), Com_SHA2Csum(), and Com_SHA2ToHex().
TEST_F | ( | GenericTest | , |
BinaryExpressionParser | |||
) |
Definition at line 794 of file test_generic.cpp.
References BEP_Evaluate(), and TEST_BEP().
|
static |
Definition at line 182 of file test_generic.cpp.
References linkedList_t::data.
Referenced by TEST_F().