Move ComputeTest,GraphicsTest,RenderTest and Std140Debug to the tests folder

Also renamed NazaraUnitTests to UnitTests
This commit is contained in:
SirLynix
2022-12-26 08:44:11 +01:00
parent fe8715f1fb
commit 4b804dc613
71 changed files with 33 additions and 36 deletions

View File

@@ -0,0 +1,28 @@
#include <Nazara/Core/AbstractHash.hpp>
#include <catch2/catch_approx.hpp>
#include <catch2/catch_test_macros.hpp>
#include <Nazara/Core/ByteArray.hpp>
#include <array>
SCENARIO("AbstractHash", "[CORE][ABSTRACTHASH]")
{
GIVEN("The hash SHA512")
{
std::unique_ptr<Nz::AbstractHash> SHA512 = Nz::AbstractHash::Get(Nz::HashType::SHA512);
SHA512->Begin();
WHEN("We introduce data")
{
std::array<Nz::UInt8, 4> array{ { 0, 1, 2, 3 } };
SHA512->Append(array.data(), array.size());
THEN("We ask for the bytearray")
{
Nz::ByteArray byteArray = SHA512->End();
CHECK(byteArray.GetSize() == SHA512->GetDigestLength());
}
}
}
}