2013-12-12 03:56:52 +01:00
|
|
|
#include <gtest/gtest.h>
|
2014-06-28 20:57:42 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <time.h>
|
2014-05-20 08:19:23 +02:00
|
|
|
#include <stdio.h>
|
2014-08-06 18:32:25 +02:00
|
|
|
#include <string.h>
|
2013-12-12 03:56:52 +01:00
|
|
|
|
2014-05-20 08:19:23 +02:00
|
|
|
|
2014-06-05 10:20:50 +02:00
|
|
|
#if (defined(ANDROID_NDK)||defined(APPLE_IOS))
|
2014-06-26 03:50:41 +02:00
|
|
|
int CodecUtMain (int argc , char** argv) {
|
2014-05-20 08:19:23 +02:00
|
|
|
#else
|
2013-12-12 23:21:12 +01:00
|
|
|
int main (int argc, char** argv) {
|
2014-05-20 08:19:23 +02:00
|
|
|
#endif
|
|
|
|
|
2014-06-26 04:57:39 +02:00
|
|
|
#if (defined(ANDROID_NDK)||defined(APPLE_IOS))
|
2014-06-26 03:50:41 +02:00
|
|
|
char xmlPath[1024] = "";
|
|
|
|
sprintf (xmlPath, "xml:%s", argv[1]);
|
|
|
|
::testing::GTEST_FLAG (output) = xmlPath;
|
2014-05-20 08:19:23 +02:00
|
|
|
#endif
|
|
|
|
::testing::InitGoogleTest (&argc, argv);
|
2014-08-06 18:32:25 +02:00
|
|
|
unsigned int seed = (unsigned int) time (NULL);
|
|
|
|
if (argc >= 2 && !strncmp (argv[1], "--seed=", 7))
|
|
|
|
seed = atoi (argv[1] + 7);
|
|
|
|
printf ("Random seed: %u\n", seed);
|
|
|
|
srand (seed);
|
2013-12-12 03:56:52 +01:00
|
|
|
|
|
|
|
return RUN_ALL_TESTS();
|
|
|
|
}
|