aboutsummaryrefslogtreecommitdiff
path: root/examples/AutomatedTest/main.cpp
diff options
context:
space:
mode:
authorparadust7 <102263465+paradust7@users.noreply.github.com>2022-05-07 02:21:41 -0700
committerGitHub <noreply@github.com>2022-05-07 11:21:41 +0200
commit51dad49d8b479ecc537acad6499926387c2de129 (patch)
tree2be0485821d225eb3b054e2c7c5e6edee46880b5 /examples/AutomatedTest/main.cpp
parentfc4eda0f447f7799fb0d7933d816780375ce845b (diff)
downloadirrlicht-51dad49d8b479ecc537acad6499926387c2de129.tar.xz
Unit tests for irrArray (#103)
Diffstat (limited to 'examples/AutomatedTest/main.cpp')
-rw-r--r--examples/AutomatedTest/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/AutomatedTest/main.cpp b/examples/AutomatedTest/main.cpp
index 0966892..2f80722 100644
--- a/examples/AutomatedTest/main.cpp
+++ b/examples/AutomatedTest/main.cpp
@@ -1,3 +1,4 @@
+#include <iostream>
#include <irrlicht.h>
#include "exampleHelper.h"
@@ -6,6 +7,8 @@ using namespace irr;
static IrrlichtDevice *device = nullptr;
static int test_fail = 0;
+extern void test_irr_array();
+
static video::E_DRIVER_TYPE chooseDriver(const char *arg_)
{
if (core::stringc(arg_) == "null")
@@ -27,8 +30,15 @@ static inline void check(bool ok, const char *msg)
}
}
+void run_unit_tests() {
+ std::cout << "Running unit tests:" << std::endl;
+ test_irr_array();
+}
+
int main(int argc, char *argv[])
{
+ run_unit_tests();
+
SIrrlichtCreationParameters p;
p.DriverType = chooseDriver(argc > 1 ? argv[1] : "");
p.WindowSize = core::dimension2du(640, 480);