EightBitNet/LR35902/LR35902.FuseTest/Tests.cs
Adrian Conlon ed92ce33f6 Starting to port Fuse test runner for LR35902 emulator. Not running yet.
Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
2019-07-19 23:59:32 +01:00

32 lines
719 B
C#

namespace Fuse
{
using System.Collections.Generic;
using System.IO;
public class Tests
{
public void Read(string path)
{
using (var file = new StreamReader(path))
{
this.Read(file);
}
}
public Dictionary<string, Test> Container { get; } = new Dictionary<string, Test>();
public void Read(StreamReader file)
{
while (!file.EndOfStream)
{
var test = new Test();
test.Read(file);
if (test.Valid)
{
this.Container.Add(test.Description, test);
}
}
}
}
}