mirror of
https://github.com/Stone-Red-Code/YesNt-Interpreter.git
synced 2026-09-04 09:06:41 +02:00
Add more unit test
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace YesNt.Interpreter.Tests;
|
||||
|
||||
[TestClass]
|
||||
public class ProcessingStatementsTests
|
||||
{
|
||||
[TestMethod]
|
||||
public void MultiplicationTest()
|
||||
{
|
||||
YesNtAssert.IsLineEqual("10 * 10 !calc", "100");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DivisionTest()
|
||||
{
|
||||
YesNtAssert.IsLineEqual("90 / 4 !calc", "22.5");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void AdditionTest()
|
||||
{
|
||||
YesNtAssert.IsLineEqual("10 + 10 !calc", "20");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void SubtractionTest()
|
||||
{
|
||||
YesNtAssert.IsLineEqual("10 - 10 !calc", "0");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ModulusTest()
|
||||
{
|
||||
YesNtAssert.IsLineEqual("10 % 3 !calc", "1");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ExponentiationTest()
|
||||
{
|
||||
YesNtAssert.IsLineEqual("2 ^ 3 !calc", "8");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user