Add Axiom Unit Tests
Some checks failed
Build .NET Project / build (push) Has been cancelled

This commit is contained in:
2026-03-19 15:01:49 -04:00
parent ec5a59201b
commit 69ce297f9f
8 changed files with 1076 additions and 13 deletions

30
AxiomUnitTests/ScannerTests.cs Executable file
View File

@@ -0,0 +1,30 @@
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using Axiom.Utils;
using Axiom.Interpreter;
using System.IO;
namespace AxiomUnitTestProject
{
[TestClass]
public class ScannerTests
{
[TestMethod]
public void ScannerShouldScan()
{
List<String> codeLines = TestData.CodeLines();
foreach(String expression in codeLines)
{
BinaryWriter binaryWriter=new BinaryWriter(new MemoryStream());
SymbolTable symbolTable = new SymbolTable();
BinaryReader binaryReader = null;
binaryReader = new BinaryReader(Utility.StreamFromString(expression));
Scanner scanner = new Scanner(binaryReader, binaryWriter, symbolTable);
Console.WriteLine("Expression:\""+expression+"\"");
Assert.IsTrue(scanner.Analyze());
Console.WriteLine("**************************");
}
}
}
}