Add Assembler tests

This commit is contained in:
Yoshi Askharoun
2024-02-03 20:51:54 -06:00
parent d95fcab104
commit cf3419c435
6 changed files with 55 additions and 6 deletions
+21
View File
@@ -3,6 +3,7 @@ using Microsoft.Iris.Asm;
using Xunit.Abstractions;
using Microsoft.Iris.Markup;
using UIX.Test.Fixtures;
using Microsoft.Iris;
namespace UIX.Test;
@@ -36,6 +37,26 @@ main:
Assert.Equal(9, ast.Body.Count());
}
[Fact]
public async Task Assemble()
{
using TempFile tempFile = new("testA.uixa", ".uixa");
await tempFile.InitAsync();
CompilerInput[] compilerInputs = [
new()
{
SourceFileName = tempFile.Path,
OutputFileName = Path.ChangeExtension(tempFile.Path, ".uib")
}
];
foreach (var compilerInput in compilerInputs)
output.WriteLine(compilerInput.OutputFileName);
MarkupCompiler.Compile(compilerInputs, default);
}
[Theory]
[InlineData("text.uib")]
[InlineData("text.uix")]