0ad/source/ps/XML/tests/test_Xeromyces.h
janwas ad55f9f1bc pending improvements and partial fixes to self-tests
fix: g_frequencyFilter is now in globals.cpp instead of in main (since
other modules access it and main.cpp isn't included in the self-test)
fix: globals.h now avoids dragging sdl.h into other projects
allocators: got rid of references to the old master header (must now
include the specific header, e.g. dynarray.h)

This was SVN commit r5534.
2008-01-03 22:07:18 +00:00

28 lines
657 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();
TS_ASSERT_OK(vfs->Mount("", "mods/_test.xero"));
char xmbPath[PATH_MAX];
CXeromyces::GetXMBPath("test1.xml", "test1.xmb", xmbPath);
TS_ASSERT_STR_EQUALS(xmbPath, "cache/mods/_test.xero/xmb/test1.xmb");
CXeromyces::GetXMBPath("a/b/test1.xml", "a/b/test1.xmb", xmbPath);
TS_ASSERT_STR_EQUALS(xmbPath, "cache/mods/_test.xero/xmb/a/b/test1.xmb");
path_ResetRootDir();
}
};