forked from citizenfx/fivem
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTestsMain.cpp
More file actions
36 lines (29 loc) · 871 Bytes
/
TestsMain.cpp
File metadata and controls
36 lines (29 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <StdInc.h>
#include <catch_amalgamated.hpp>
#include <ComponentLoader.h>
int main(const int argc, char* argv[])
{
ComponentLoader* loader = ComponentLoader::GetInstance();
loader->Initialize();
ComponentLoader::GetInstance()->ForAllComponents([&](fwRefContainer<ComponentData> componentData)
{
for (auto& instance : componentData->GetInstances())
{
// only initialize the vfs server implementation for now, because it is required for lua sandboxing tests
if (componentData->GetName() != "vfs:impl:server")
{
continue;
}
instance->SetCommandLine(argc, argv);
instance->Initialize();
}
});
Catch::Session session;
const int returnCode = session.applyCommandLine(argc, argv);
if (returnCode != 0)
{
return returnCode;
}
const int numFailed = session.run();
return numFailed;
}