Fix names in unittests

This commit is contained in:
momo5502 2016-09-16 11:04:28 +02:00
parent 503e071d7e
commit c2931a04e1
56 changed files with 67 additions and 57 deletions

View File

@ -19,5 +19,5 @@
| `--force-minidump-upload` | Upload minidumps even for Debug builds. |
| `--disable-bitmessage` | Disable use of BitMessage completely. |
| `--disable-node-log` | Disable debugging messages for Nodes in Debug builds. |
| `--disable-base128` | Disable debugging messages for Nodes in Debug builds. |
| `--disable-base128` | Disable base128 encoding for minidumps. |
| `--no-new-structure` | Do not use new virtual path structure (separating headers and source files). |

View File

@ -80,7 +80,7 @@ newoption {
newoption {
trigger = "disable-base128",
description = "Disable debugging messages for Nodes in Debug builds."
description = "Disable base128 encoding for minidumps."
}
newaction {

View File

@ -79,7 +79,10 @@ namespace Components
for (auto component : Loader::Components)
{
#ifdef DEBUG
if(!Loader::PerformingUnitTests())
{
Logger::Print("Unregistering component: %s\n", component->GetName());
}
#endif
delete component;
}
@ -95,7 +98,7 @@ namespace Components
for (auto component : Loader::Components)
{
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
Logger::Print("Testing '%s'...\n", component->GetName());
#endif
auto startTime = std::chrono::high_resolution_clock::now();
@ -122,7 +125,10 @@ namespace Components
if (component)
{
#ifdef DEBUG
if(!Loader::PerformingUnitTests())
{
Logger::Print("Component registered: %s\n", component->GetName());
}
#endif
Loader::Components.push_back(component);
}

View File

@ -6,7 +6,7 @@ namespace Components
Component() {};
virtual ~Component() {};
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
virtual const char* GetName() { return "Unknown"; };
#endif

View File

@ -11,7 +11,7 @@ namespace Components
AntiCheat();
~AntiCheat();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "AntiCheat"; };
#endif

View File

@ -20,7 +20,7 @@ namespace Components
AssetHandler();
~AssetHandler();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "AssetHandler"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Auth();
~Auth();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Auth"; };
#endif

View File

@ -8,7 +8,7 @@ namespace Components
Bans();
~Bans();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Bans"; };
#endif

View File

@ -13,7 +13,7 @@ namespace Components
BitMessage();
~BitMessage();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "BitMessage"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Colors();
~Colors();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Colors"; };
#endif

View File

@ -26,7 +26,7 @@ namespace Components
Command();
~Command();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Command"; };
#endif

View File

@ -5,7 +5,7 @@ namespace Components
public:
ConnectProtocol();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "ConnectProtocol"; };
#endif

View File

@ -9,7 +9,7 @@ namespace Components
Console();
~Console();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Console"; };
#endif

View File

@ -5,7 +5,7 @@ namespace Components
public:
D3D9Ex();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "D3D9Ex"; };
#endif

View File

@ -8,7 +8,7 @@ namespace Components
Dedicated();
~Dedicated();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Dedicated"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Discovery();
~Discovery();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Discovery"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Download();
~Download();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Download"; };
#endif

View File

@ -42,7 +42,7 @@ namespace Components
Dvar();
~Dvar();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Dvar"; };
#endif

View File

@ -8,7 +8,7 @@ namespace Components
Exception();
~Exception();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Exception"; };
#endif
static LPTOP_LEVEL_EXCEPTION_FILTER Hook();

View File

@ -6,7 +6,7 @@ namespace Components
FastFiles();
~FastFiles();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "FastFiles"; };
#endif

View File

@ -41,7 +41,7 @@ namespace Components
FileSystem();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "FileSystem"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Flags();
~Flags();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Flags"; };
#endif

View File

@ -63,7 +63,7 @@ namespace Components
IPCPipe();
~IPCPipe();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "IPCPipe"; };
#endif

View File

@ -8,7 +8,7 @@ namespace Components
public:
Lean();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Lean"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Localization();
~Localization();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Localization"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Logger();
~Logger();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Logger"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Maps();
~Maps();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Maps"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Materials();
~Materials();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Materials"; };
#endif

View File

@ -9,7 +9,7 @@ namespace Components
Menus();
~Menus();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Menus"; };
#endif

View File

@ -36,7 +36,7 @@ namespace Components
class MinidumpUpload : public Component
{
public:
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "MinidumpUpload"; };
#endif
MinidumpUpload();

View File

@ -6,7 +6,7 @@ namespace Components
ModList();
~ModList();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "ModList"; };
#endif

View File

@ -6,6 +6,10 @@ namespace Components
ModelSurfs();
~ModelSurfs();
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "ModelSurfs"; };
#endif
private:
static std::map<void*, IUnknown*> BufferMap;
static std::map<void*, Game::CModelAllocData*> AllocMap;

View File

@ -6,7 +6,7 @@ namespace Components
MusicalTalent();
~MusicalTalent();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "MusicalTalent"; };
#endif

View File

@ -56,7 +56,7 @@ namespace Components
Network();
~Network();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Network"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
News();
~News();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "News"; };
#endif

View File

@ -17,7 +17,7 @@ namespace Components
Node();
~Node();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Node"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Party();
~Party();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Party"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
PlayerName();
~PlayerName();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "PlayerName"; };
#endif

View File

@ -8,7 +8,7 @@ namespace Components
Playlist();
~Playlist();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Playlist"; };
#endif

View File

@ -8,7 +8,7 @@ namespace Components
QuickPatch();
~QuickPatch();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "QuickPatch"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
RCon();
~RCon();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "RCon"; };
#endif

View File

@ -5,7 +5,7 @@ namespace Components
public:
RawFiles();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "RawFiles"; };
#endif

View File

@ -9,7 +9,7 @@ namespace Components
Renderer();
~Renderer();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Renderer"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Script();
~Script();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Script"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
ServerInfo();
~ServerInfo();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "ServerInfo"; };
#endif

View File

@ -27,7 +27,7 @@ namespace Components
ServerList();
~ServerList();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "ServerList"; };
#endif

View File

@ -5,7 +5,7 @@ namespace Components
public:
Singleton();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Singleton"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
StringTable();
~StringTable();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "StringTable"; };
#endif

View File

@ -24,7 +24,7 @@ namespace Components
StructuredData();
~StructuredData();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "StructuredData"; };
#endif

View File

@ -5,7 +5,7 @@ namespace Components
public:
Theatre();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Theatre"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
Toast();
~Toast();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Toast"; };
#endif

View File

@ -17,7 +17,7 @@ namespace Components
UIFeeder();
~UIFeeder();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "UIFeeder"; };
#endif

View File

@ -6,7 +6,7 @@ namespace Components
UIScript();
~UIScript();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "UIScript"; };
#endif

View File

@ -5,7 +5,7 @@ namespace Components
public:
Weapon();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Weapon"; };
#endif

View File

@ -5,7 +5,7 @@ namespace Components
public:
Window();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "Window"; };
#endif

View File

@ -73,7 +73,7 @@ namespace Components
ZoneBuilder();
#ifdef DEBUG
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* GetName() { return "ZoneBuilder"; };
#endif