fix: changed stack memory test for unittest

This commit is contained in:
ikpil 2024-01-21 12:57:27 +09:00 committed by Ikpil
parent 94ee6f9366
commit 75eadc601d
1 changed files with 2 additions and 15 deletions

View File

@ -24,26 +24,13 @@ public class RcStackArrayTest
} }
[Test] [Test]
public void TestStackOverflowBy128X512XFloat() public void TestStackOverflow()
{
// 128 * 512 * 4 bytes
var array = RcStackArray128<RcStackArray512<float>>.Empty;
Assert.That(array.Length, Is.EqualTo(128));
for (int i = 0; i < array.Length; ++i)
{
Assert.That(array[i].Length, Is.EqualTo(512));
}
}
[Test]
public void TestStackOverflowBy256X512XFloat()
{ {
// normal // normal
var array_128_512_1 = RcStackArray128<RcStackArray512<float>>.Empty; // 128 * 512 = 65536 var array_128_512_1 = RcStackArray128<RcStackArray512<float>>.Empty; // 128 * 512 = 65536
// warn // warn
var array_128_512_2 = RcStackArray128<RcStackArray512<float>>.Empty; // 128 * 512 = 65536 //var array_128_512_2 = RcStackArray128<RcStackArray512<float>>.Empty; // 128 * 512 = 65536
// danger // danger
// var array_32_512_1 = RcStackArray32<RcStackArray512<float>>.Empty; // 32 * 512 = 16384 // var array_32_512_1 = RcStackArray32<RcStackArray512<float>>.Empty; // 32 * 512 = 16384