feat: finally able to overcome the base of the base of this f*cked up mess
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user