/* * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ #include #include "Host/Windows/EmbeddedResourceLoaderWindows.hpp" #include "Base/Logger.hpp" #include "../resources/resource.h" #include #include #include using namespace OpenVulkano; TEST_CASE("Load icon") { Logger::SetupLogger("", "tests.log"); EmbeddedResourceLoaderWindows loader; // the icon is split into RT_GROUP_ICON and RT_ICON. resource.h defines RT_GROUP_ICON entry // RT_GROUP_ICON data Array groupData = loader.GetResource(MAKEINTRESOURCE(IDI_MADVOXEL_ICON), RT_GROUP_ICON); // load resource that has no numeric ID Array groupData2 = loader.GetResource("MADVOXEL_ICON", RT_GROUP_ICON); REQUIRE((!groupData.Empty() && groupData.Size() == groupData2.Size())); // ICON data Array iconData = loader.GetResource(MAKEINTRESOURCE(1), RT_ICON); REQUIRE((!iconData.Empty() && iconData.Size() == 194344)); }