diff options
author | sfan5 <sfan5@live.de> | 2022-11-11 16:25:49 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2022-11-11 16:25:49 +0100 |
commit | b9e0641203990ebc1bfcdf5fa259694ad58f2f85 (patch) | |
tree | 51f6335db00dbdb3f65d5e7b151a050dc0c81da7 /examples/AutomatedTest/main.cpp | |
parent | 6f98515f344eb34e9317ef9bb92fee3a2a2bee95 (diff) | |
download | irrlicht-b9e0641203990ebc1bfcdf5fa259694ad58f2f85.tar.xz |
Add unittests for irrString
Diffstat (limited to 'examples/AutomatedTest/main.cpp')
-rw-r--r-- | examples/AutomatedTest/main.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/examples/AutomatedTest/main.cpp b/examples/AutomatedTest/main.cpp index 2f80722..6fac6f4 100644 --- a/examples/AutomatedTest/main.cpp +++ b/examples/AutomatedTest/main.cpp @@ -7,7 +7,8 @@ using namespace irr; static IrrlichtDevice *device = nullptr;
static int test_fail = 0;
-extern void test_irr_array();
+void test_irr_array();
+void test_irr_string();
static video::E_DRIVER_TYPE chooseDriver(const char *arg_)
{
@@ -32,7 +33,12 @@ static inline void check(bool ok, const char *msg) void run_unit_tests() {
std::cout << "Running unit tests:" << std::endl;
- test_irr_array();
+ try {
+ test_irr_array();
+ test_irr_string();
+ } catch (const std::exception &e) {
+ test_fail++;
+ }
}
int main(int argc, char *argv[])
@@ -99,7 +105,7 @@ int main(int argc, char *argv[]) while (device->run())
{
- if (device->getTimer()->getTime() >= 1300)
+ if (device->getTimer()->getTime() >= 1000)
{
device->getTimer()->setTime(0);
++n;
|