MCPcopy Create free account
hub / github.com/defold/defold / SetUp

Method SetUp

engine/resource/src/test/test_provider_file.cpp:68–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66{
67protected:
68 void SetUp() override
69 {
70 m_Loader = dmResourceProvider::FindLoaderByName(dmHashString64("file"));
71 ASSERT_NE((ArchiveLoader*)0, m_Loader);
72
73 dmURI::Parts uri;
74#if defined(__EMSCRIPTEN__)
75 // Trigger the vsf init for emscripten (hidden in MakeHostPath)
76 char path[1024];
77 dmTestUtil::MakeHostPath(path, sizeof(path), "src");
78 dmURI::Parse(DM_HOSTFS, &uri);
79#else
80 dmURI::Parse(".", &uri);
81#endif
82
83 dmResourceProvider::Result result = dmResourceProvider::CreateMount(m_Loader, &uri, 0, &m_Archive);
84 ASSERT_EQ(dmResourceProvider::RESULT_OK, result);
85 }
86
87 void TearDown() override
88 {

Callers

nothing calls this directly

Calls 4

FindLoaderByNameFunction · 0.85
MakeHostPathFunction · 0.85
CreateMountFunction · 0.85
ParseFunction · 0.50

Tested by

no test coverage detected