Skip to content

Commit

Permalink
[ORO-0] Fix integer overflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
shoikeda committed Feb 5, 2025
1 parent ea4dc4f commit a6c7bb1
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions UnitTest/basicTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,18 +128,18 @@ TEST_F( OroTestBase, GpuMemoryAllocationTest )
};

const std::array<std::pair<size_t, std::string_view>, 12> memorySizeList = {{
{1, "1 B"},
{4, "4 B"},
{8, "8 B"},
{64, "64 B"},
{1024, "1 KB"},
{1024 * 1024, "1 MB"},
{512 * 1024 * 1024, "512 MB"},
{1024 * 1024 * 1024, "1 GB"},
{(1024 + 512) * 1024 * 1024, "1.5 GB"},
{2 * 1024 * 1024 * 1024, "2 GB"},
{3 * 1024 * 1024 * 1024, "3 GB"},
{4 * 1024 * 1024 * 1024, "4 GB"}
{1ull, "1 B"},
{4ull, "4 B"},
{8ull, "8 B"},
{64ull, "64 B"},
{1024ull, "1 KB"},
{1024ull * 1024, "1 MB"},
{512ull * 1024 * 1024, "512 MB"},
{1024ull * 1024 * 1024, "1 GB"},
{(1024ull + 512ull) * 1024 * 1024, "1.5 GB"},
{2ull * 1024 * 1024 * 1024, "2 GB"},
{3ull * 1024 * 1024 * 1024, "3 GB"},
{4ull * 1024 * 1024 * 1024, "4 GB"}
}};
std::for_each( memorySizeList.begin(), memorySizeList.end(), testAllocation );
}
Expand Down

0 comments on commit a6c7bb1

Please sign in to comment.