mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-20 07:13:56 -07:00
- topology.cpp: modify interface due to thread-safety issue. caller is now responsible for ensuring the first _Detect call isn't reentered; everything else is safe. - fix thread-safety issue in wnuma; use winit mechanism to ensure it's ready before use - VFS now takes a cacheSize parameter (required for being able to disable read-only file caches for the image loader at work) - allow dynarray that isn't actually holding memory - debug_stl: VC9 fix (disable this code except on the exact STL version on which it was tested) - zlib, lib_api: changes to macro used to toggle between static and dynamic linking - add boost filesystem header in external_libraries - amd64: cpu_ topology functions are now provided by x86_x64 - cpu: remove cpu_ClockFrequency (dangerous, may be tempting to use during WHRT init which would cause a crash). use x86_x64_ClockFrequency or os_cpu_ClockFrequency instead. - werrno: cope with newer boost versions - wmman: follow SUSv3 in rejecting zero-length mappings This was SVN commit r5954.
27 lines
684 B
C++
27 lines
684 B
C++
#include "lib/self_test.h"
|
|
|
|
#include "ps/XML/Xeromyces.h"
|
|
#include "lib/file/vfs/vfs.h"
|
|
#include "lib/file/path.h"
|
|
|
|
class TestXeromyces : public CxxTest::TestSuite
|
|
{
|
|
public:
|
|
void test_paths()
|
|
{
|
|
TS_ASSERT_OK(path_SetRoot(0, "../data"));
|
|
PIVFS vfs = CreateVfs(20*MiB);
|
|
|
|
TS_ASSERT_OK(vfs->Mount("", "mods/_test.xero"));
|
|
|
|
VfsPath xmbPath;
|
|
|
|
CXeromyces::GetXMBPath(vfs, "test1.xml", "test1.xmb", xmbPath);
|
|
TS_ASSERT_STR_EQUALS(xmbPath.string(), "cache/mods/_test.xero/xmb/test1.xmb");
|
|
|
|
CXeromyces::GetXMBPath(vfs, "a/b/test1.xml", "a/b/test1.xmb", xmbPath);
|
|
TS_ASSERT_STR_EQUALS(xmbPath.string(), "cache/mods/_test.xero/xmb/a/b/test1.xmb");
|
|
|
|
path_ResetRootDir();
|
|
}
|
|
};
|