RDK Documentation (Open Sourced RDK Components)
drmTests.cpp
1 #include <cjson/cJSON.h>
2 
3 #include "CppUTest/TestHarness.h"
4 #include "CppUTest/TestHarness_c.h"
5 #include "CppUTest/TestRegistry.h"
6 #include "CppUTest/CommandLineTestRunner.h"
7 #include "CppUTestExt/MockSupportPlugin.h"
8 
9 int main(int ac, char** av)
10 {
11  MemoryLeakWarningPlugin::turnOffNewDeleteOverloads();
12  MockSupportPlugin mockPlugin;
13  TestRegistry::getCurrentRegistry()->installPlugin(&mockPlugin);
14 
15  cJSON_Hooks hooks;
16  hooks.malloc_fn = cpputest_malloc;
17  hooks.free_fn = cpputest_free;
18  cJSON_InitHooks(&hooks);
19 
20  return CommandLineTestRunner::RunAllTests(ac, av);
21 }