mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-05-04 22:33:51 +00:00
chore(file): add tests for SFile functions
This commit is contained in:
parent
1e86f98691
commit
40d58978e1
20 changed files with 567 additions and 18 deletions
29
test/FileTest.hpp
Normal file
29
test/FileTest.hpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include "Test.hpp"
|
||||
#include "storm/Error.hpp"
|
||||
#include "storm/File.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
struct OpenFileTestCase {
|
||||
std::string info;
|
||||
HSARCHIVE (*OpenArchiveFn)();
|
||||
uint32_t flags;
|
||||
};
|
||||
|
||||
struct ReadFileTestCase {
|
||||
std::string info;
|
||||
HSFILE (*OpenFileFn)();
|
||||
uint32_t eofcode;
|
||||
};
|
||||
|
||||
HSARCHIVE OpenNullArchive();
|
||||
HSARCHIVE OpenTestArchive();
|
||||
|
||||
HSFILE ReadTestFileFromDisk();
|
||||
HSFILE ReadTestFileFromMpq();
|
||||
|
||||
extern OpenFileTestCase OpenFromDiskCase;
|
||||
extern OpenFileTestCase OpenFromMPQCase;
|
||||
|
||||
extern ReadFileTestCase ReadFromDiskCase;
|
||||
extern ReadFileTestCase ReadFromMPQCase;
|
||||
Loading…
Add table
Add a link
Reference in a new issue