add zip resource and new test
This commit is contained in:
@@ -52,7 +52,7 @@ namespace OpenVulkano
|
||||
|
||||
std::string EmbeddedResourceLoaderWindows::GetResourceName(const char* resId)
|
||||
{
|
||||
// check if resId was provided as interger and not CString
|
||||
// check if resId was provided as interger or CString
|
||||
// https://stackoverflow.com/questions/3610565/why-does-makeintresource-work
|
||||
// first 64KB
|
||||
uintptr_t ptrT = reinterpret_cast<uintptr_t>(resId);
|
||||
|
||||
BIN
resources/arch.zip
Normal file
BIN
resources/arch.zip
Normal file
Binary file not shown.
@@ -63,3 +63,4 @@ END
|
||||
// FOR REFERENCE SEE EmbeddedResourceLoaderWindows.cpp
|
||||
IDI_MADVOXEL_ICON ICON "madvoxel_icon.ico"
|
||||
MADVOXEL_ICON ICON "madvoxel_icon.ico"
|
||||
ARCHIVE_RCDATA RCDATA "arch.zip"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
#define IDI_MADVOXEL_ICON 101
|
||||
#define ARCHIVE_RCDATA 102
|
||||
|
||||
@@ -42,3 +42,10 @@ TEST_CASE("Load icon")
|
||||
Array<char> nonExistingRes2 = loader.GetResource("NON_EXISTING_ICON", RT_GROUP_ICON);
|
||||
REQUIRE((nonExistingRes.Empty() && nonExistingRes2.Empty()));
|
||||
}
|
||||
|
||||
TEST_CASE("Load archive")
|
||||
{
|
||||
EmbeddedResourceLoaderWindows loader;
|
||||
Array<char> zipData = loader.GetResource(MAKEINTRESOURCE(ARCHIVE_RCDATA), RT_RCDATA);
|
||||
REQUIRE(!zipData.Empty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user