Skip to content

Commit abc450e

Browse files
Merge pull request #277 from MiranDMC/3D_Vector_refactoring
CVector refactor
2 parents 33e834e + 1c1b525 commit abc450e

File tree

35 files changed

+3236
-1400
lines changed

35 files changed

+3236
-1400
lines changed

examples/Test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
## Test
2-
Test plugin project used in automatic builds for verification of generated PluginSDK binaries.
2+
Test plugin project is used in automatic builds for verification of generated PluginSDK binaries.

examples/UnitTests/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## Unit Tests
2+
Plugin hosting and running Unit Tests.

examples/UnitTests/source/Main.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#include <plugin.h>
2+
#include "utest.h"
3+
#include "Test_CVector.h"
4+
5+
using namespace plugin;
6+
7+
UTEST_STATE();
8+
9+
struct Main
10+
{
11+
Main()
12+
{
13+
gInstance.RunTests(); // run now. In future some tests might require the game to be initialized
14+
// register event callbacks
15+
//Events::menuDrawingEvent += []{ gInstance.RunTests(); };
16+
}
17+
18+
void RunTests()
19+
{
20+
// just once
21+
static bool ran = false;
22+
if (ran) return;
23+
ran = true;
24+
25+
if(AllocConsole())
26+
{
27+
SetWindowText(GetConsoleWindow(), "Plugin-SDK Unit Tests");
28+
//RemoveMenu(GetSystemMenu(GetConsoleWindow(), FALSE), SC_CLOSE, MF_BYCOMMAND);
29+
30+
// redirect output into new console
31+
FILE* fDummy;
32+
freopen_s(&fDummy, "CONOUT$", "w", stdout);
33+
std::cout.clear();
34+
std::clog.clear();
35+
}
36+
37+
utest_main(__argc, __argv);
38+
}
39+
} gInstance;
40+

0 commit comments

Comments
 (0)