-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix disassembling TypeSpec when it appears in array type
Issue: #147
- Loading branch information
1 parent
4b59136
commit ad90b7c
Showing
4 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
tests/CilTools.BytecodeAnalysis.Tests/Syntax/SyntaxGenerationTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* CIL Tools | ||
* Copyright (c) 2024, MSDN.WhiteKnight (https://github.com/MSDN-WhiteKnight) | ||
* License: BSD 2.0 */ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
using System.Text; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using CilTools.Tests.Common; | ||
using CilTools.Tests.Common.TextUtils; | ||
|
||
namespace CilTools.BytecodeAnalysis.Tests.Syntax | ||
{ | ||
[TestClass] | ||
public class SyntaxGenerationTests | ||
{ | ||
// Tests that verify disassembler output in different cases | ||
|
||
[TestMethod] | ||
[MethodTestData(typeof(SampleMethods), "TestArrayOfArrays", BytecodeProviders.Metadata)] | ||
public void Test_Operand_ArrayOfArrays(MethodBase mi) | ||
{ | ||
CilGraph graph = CilGraph.Create(mi); | ||
string str = graph.ToText(); | ||
|
||
AssertThat.IsMatch(str, new Text[] { | ||
Text.Any, "newarr", Text.Any, "uint8[]", Text.Any | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters