Skip to content

Commit

Permalink
Fix complex_test
Browse files Browse the repository at this point in the history
Fix IOFormat and DataArrayTest
  • Loading branch information
mmarineBlueQuartz committed Oct 24, 2023
1 parent 320dc2f commit f462bc7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions test/DataArrayTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

using namespace complex;

namespace unit_test
{
inline constexpr StringLiteral k_BuildDir = COMPLEX_BUILD_DIR;
}

TEST_CASE("Array")
{
FloatVec3 vec0(3.0F, 4.0F, 5.0F);
Expand Down Expand Up @@ -52,6 +57,7 @@ TEST_CASE("DataArrayCreation")

TEST_CASE("complex::DataArray Copy TupleTest", "[complex][DataArray]")
{
Application::GetOrCreateInstance()->loadPlugins(unit_test::k_BuildDir.view(), true);

const std::string k_DataArrayName("DataArray");
const DataPath k_DataPath({k_DataArrayName});
Expand Down
7 changes: 6 additions & 1 deletion test/IOFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ TEST_CASE("Target DataStructure Size", "IOTest")

const uint64 memory = Memory::GetTotalMemory();
const uint64 largeDataSize = preferences->valueAs<uint64>(Preferences::k_LargeDataSize_Key);
const uint64 targetReducedSize = (memory - largeDataSize);
const uint64 minimumRemaining = 2 * largeDataSize;
uint64 targetReducedSize = (memory - 2 * largeDataSize);
if(minimumRemaining >= memory)
{
targetReducedSize = memory / 2;
}
REQUIRE(preferences->defaultValueAs<uint64>(Preferences::k_LargeDataStructureSize_Key) == targetReducedSize);
}

0 comments on commit f462bc7

Please sign in to comment.