feat: finally able to overcome the base of the base of this f*cked up mess

This commit is contained in:
mattia
2025-03-01 17:06:56 +01:00
parent eed28168ad
commit 6ee8051004
20 changed files with 518 additions and 2306 deletions

View File

@@ -20,12 +20,15 @@ public class ContentTextTest
var fileReader = new InMemoryFileReader([
("main.ink", inkInput)
]);
var parser = new InkBlotParser();
using var loggerFactory = Helpers.GetLoggerFactory();
var (story, diagnostics) = InkBlotParser.Parse(fileReader, loggerFactory, "main.ink");
var (story, diagnosticsEnumerable) = InkBlotParser.Parse(fileReader, loggerFactory, "main.ink");
var diagnostics = diagnosticsEnumerable.ToArray();
// check the diagnostic counts match
diagnostics.Count().ShouldBe(numErrors);
if (numErrors == 0)
diagnostics.ShouldBe([]);
else
diagnostics.Count().ShouldBe(numErrors);
// check the contents match (only if there was no diagnostic)
if (numErrors != 0) return;