mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Add dumper for DDS and texture converter for reordering colors
This commit is contained in:
43
test/ObjCommonTests.lua
Normal file
43
test/ObjCommonTests.lua
Normal file
@ -0,0 +1,43 @@
|
||||
ObjCommonTests = {}
|
||||
|
||||
function ObjCommonTests:include()
|
||||
|
||||
end
|
||||
|
||||
function ObjCommonTests:link()
|
||||
if References:link("ObjCommonTests") then
|
||||
links "ObjCommonTests"
|
||||
end
|
||||
end
|
||||
|
||||
function ObjCommonTests:use()
|
||||
|
||||
end
|
||||
|
||||
function ObjCommonTests:project()
|
||||
References:reset()
|
||||
local folder = TestFolder();
|
||||
|
||||
project "ObjCommonTests"
|
||||
targetdir(TargetDirectoryTest)
|
||||
location "%{wks.location}/test/%{prj.name}"
|
||||
kind "SharedLib"
|
||||
language "C++"
|
||||
|
||||
files {
|
||||
path.join(folder, "ObjCommonTests/**.h"),
|
||||
path.join(folder, "ObjCommonTests/**.cpp")
|
||||
}
|
||||
|
||||
vpaths {
|
||||
["*"] = {
|
||||
path.join(folder, "ObjCommonTests"),
|
||||
path.join(BuildFolder(), "src/ZoneCode")
|
||||
}
|
||||
}
|
||||
|
||||
self:include()
|
||||
ObjCommon:include()
|
||||
|
||||
ObjCommon:link()
|
||||
end
|
22
test/ObjCommonTests/Image/ImageFormatTests.cpp
Normal file
22
test/ObjCommonTests/Image/ImageFormatTests.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
#include "CppUnitTest.h"
|
||||
#include "Image/ImageFormat.h"
|
||||
|
||||
using namespace Microsoft::VisualStudio::CppUnitTestFramework;
|
||||
|
||||
namespace ObjCommonTests
|
||||
{
|
||||
TEST_CLASS(ImageFormatTests)
|
||||
{
|
||||
public:
|
||||
TEST_METHOD(EnsureAllFormatsArrayIndicesAreIds)
|
||||
{
|
||||
Assert::AreEqual(static_cast<unsigned int>(ImageFormatId::MAX), _countof(ImageFormat::ALL_FORMATS));
|
||||
|
||||
for(unsigned i = 0; i < _countof(ImageFormat::ALL_FORMATS); i++)
|
||||
{
|
||||
Assert::IsNotNull(ImageFormat::ALL_FORMATS[i]);
|
||||
Assert::AreEqual(i, static_cast<unsigned>(ImageFormat::ALL_FORMATS[i]->GetId()));
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user