ocarina/tests/file/compile.cpp

20 lines
388 B
C++

/*
* Test that a file object can be created and resolves paths correctly.
*/
#include <file.h>
#include <print.h>
void test_filepath(FileLocHint hint)
{
File file("test.file", hint);
print("File path is: %s\n", file.get_filepath());
}
int main(int argc, char **argv)
{
test_filepath(FILE_TYPE_CONFIG);
test_filepath(FILE_TYPE_DATA);
test_filepath(FILE_TYPE_LEGACY);
return 0;
}