Skip to content

Commit b553a66

Browse files
committed
Included tests for textual tree
1 parent 3ee2816 commit b553a66

6 files changed

Lines changed: 2128 additions & 2123 deletions

File tree

Shared/TextualTreeFormatter.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ private void WriteTextualNode(object o) {
8484
WriteEOL();
8585
childNodes.ForEach((node, index) => {
8686
if (index > 0) { WriteEOL(); }
87-
Write(node.name);
88-
Write(" - ");
87+
Write(${node.name} - ");
8988
WriteNode(node);
9089
});
9190
Dedent();

Tests.DataGenerator/Program.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ static void Main(string[] args) {
5050
lines.Add(toWrite);
5151
});
5252

53+
lines.Add("------");
54+
5355
File.WriteAllLines("generated test data.txt", lines);
5456
}
5557
}

Tests.DotNetCore/Runner.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static class Runner {
1414
// TODO How can we make this happen automatically, once the assembly is loaded?
1515
static Runner() => RegisterTestObjectContainer(typeof(Objects.VBCompiler));
1616

17-
public static readonly string[] Formatters = new[] { CSharp, VisualBasic, FactoryMethods, ObjectNotation };
17+
public static readonly string[] Formatters = new[] { CSharp, VisualBasic, FactoryMethods, ObjectNotation, TextualTree };
1818

1919
public static void RunTest(object o, string objectName, ExpectedDataFixture allExpected) {
2020
var actual = Formatters.Select(formatter => {

Tests.DotNetCore/Tests.DotNetCore.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
<None Update="factory methods-testdata.txt">
3434
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3535
</None>
36+
<None Update="textual tree-testdata.txt">
37+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
38+
</None>
3639
<None Update="visual basic-testdata.txt">
3740
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3841
</None>

0 commit comments

Comments
 (0)