mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-20 12:58:39 +00:00
40 lines
980 B
C#
40 lines
980 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace TestSuite.Tests
|
|
{
|
|
public class MathTest : TestBase
|
|
{
|
|
public override string Name
|
|
{
|
|
get { return "Math"; }
|
|
}
|
|
|
|
public override void Initialize()
|
|
{
|
|
|
|
}
|
|
|
|
public override void Teardown()
|
|
{
|
|
}
|
|
|
|
public override void Test()
|
|
{
|
|
Assert(1 + 1 == 2, "1 + 1 == 2");
|
|
Assert(-1 + 2 == 1, "-1 + 2 == 1");
|
|
Assert(2 * 2 == 4, "2 * 2 == 4");
|
|
Assert(6 / 2 == 3, "6 / 2 == 3");
|
|
Assert(5 - 2 == 3, "5 - 2 == 3");
|
|
Assert(2 + 5 * 2 == 12, "2 + 5 * 2 == 12");
|
|
Assert((2 + 5) * 2 == 14, "(2 + 5) * 2 == 14");
|
|
|
|
UInt32 a = 5;
|
|
UInt32 b = 5;
|
|
Assert(a == b, "UInt32 Equality");
|
|
b = 10;
|
|
Assert(a != b, "UInt32 Inequality");
|
|
}
|
|
}
|
|
}
|