Unit tests for irrArray (#103)

This commit is contained in:
paradust7
2022-05-07 02:21:41 -07:00
committed by GitHub
parent fc4eda0f44
commit 51dad49d8b
4 changed files with 177 additions and 0 deletions

View File

@@ -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);