Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VFSFixture is now in a separate header file so it can be included by both vfsTest and shadersTest.
- Loading branch information
Matthew Mott
committed
Mar 12, 2019
1 parent
4f46db8
commit 17be980
Showing
4 changed files
with
35 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#pragma once | ||
|
||
#include "radiant/vfs/Doom3FileSystem.h" | ||
|
||
// Fixture for tests that make use of the VFS | ||
struct VFSFixture | ||
{ | ||
// The Doom3FileSystem under test | ||
vfs::Doom3FileSystem fs; | ||
|
||
// Initialisation parameters for the Doom3FileSystem | ||
vfs::VirtualFileSystem::ExtensionSet pakExtensions; | ||
vfs::SearchPaths searchPaths; | ||
|
||
VFSFixture() | ||
{ | ||
// Setup the output stream | ||
GlobalOutputStream().setStream(std::cout); | ||
|
||
// Configure search paths and extensions | ||
pakExtensions.insert("pk4"); | ||
searchPaths.insertIfNotExists( | ||
std::string(getenv("srcdir")) + "/test/data/vfs_root" | ||
); | ||
|
||
// Initialise the VFS | ||
fs.initialise(searchPaths, pakExtensions); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters