mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-22 05:48:37 +00:00
Removed test from int16
removed test from int16 and created a int64 test for Add and Sub.Ovf
This commit is contained in:
parent
c157317889
commit
7233eb71d9
2 changed files with 27 additions and 27 deletions
|
|
@ -8,7 +8,6 @@ namespace Cosmos.Compiler.Tests.Bcl.System
|
|||
{
|
||||
public static void Execute()
|
||||
{
|
||||
bool efuse;
|
||||
short value;
|
||||
string result;
|
||||
string expectedResult;
|
||||
|
|
@ -143,32 +142,6 @@ namespace Cosmos.Compiler.Tests.Bcl.System
|
|||
|
||||
ByRefTestMethod(ref value);
|
||||
Assert.IsTrue(value == 61, "Passing an Int16 by ref to a method doesn't work");
|
||||
|
||||
//Test StackOverflow Exceptions
|
||||
short val3o;
|
||||
efuse = false;
|
||||
val3o = 10000;
|
||||
try
|
||||
{
|
||||
val3o += 32767;
|
||||
}
|
||||
catch (StackOverflowException e)
|
||||
{
|
||||
efuse = true;
|
||||
}
|
||||
Assert.IsTrue(efuse == false, "Add_Ovf for Int16 doesn't work");
|
||||
|
||||
efuse = false;
|
||||
val3o = -10000;
|
||||
try
|
||||
{
|
||||
val3o -= 32767;
|
||||
}
|
||||
catch (StackOverflowException e)
|
||||
{
|
||||
efuse = true;
|
||||
}
|
||||
Assert.IsTrue(efuse == false, "Sub_Ovf for Int16 doesn't work");
|
||||
}
|
||||
|
||||
public static short TestMethod(short aParam)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ namespace Cosmos.Compiler.Tests.Bcl.System
|
|||
{
|
||||
public static void Execute()
|
||||
{
|
||||
bool efuse;
|
||||
long value;
|
||||
string result;
|
||||
string expectedResult;
|
||||
|
|
@ -147,6 +148,32 @@ namespace Cosmos.Compiler.Tests.Bcl.System
|
|||
|
||||
ByRefTestMethod(ref value);
|
||||
Assert.IsTrue(value == 61, "Passing an Int64 by ref to a method doesn't work");
|
||||
|
||||
//Test StackOverflow Exceptions
|
||||
long val3o;
|
||||
efuse = false;
|
||||
val3o = 1000000;
|
||||
try
|
||||
{
|
||||
val3o += long.MaxValue;
|
||||
}
|
||||
catch (StackOverflowException e)
|
||||
{
|
||||
efuse = true;
|
||||
}
|
||||
Assert.IsTrue(efuse == false, "Add_Ovf for Int16 doesn't work");
|
||||
|
||||
efuse = false;
|
||||
val3o = -10000;
|
||||
try
|
||||
{
|
||||
val3o -= long.MaxValue;
|
||||
}
|
||||
catch (StackOverflowException e)
|
||||
{
|
||||
efuse = true;
|
||||
}
|
||||
Assert.IsTrue(efuse == false, "Sub_Ovf for Int16 doesn't work");
|
||||
}
|
||||
|
||||
public static long TestMethod(long aParam)
|
||||
|
|
|
|||
Loading…
Reference in a new issue