Skip to content

Commit

Permalink
Adds disabled test for assignment of inline array stored in a field t…
Browse files Browse the repository at this point in the history
…o a Span<T> (#320)
  • Loading branch information
adrianoc committed Feb 7, 2025
1 parent b8775b3 commit 8758ab2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Cecilifier.Core.Tests/Tests/Unit/InlineArrayTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public struct IntBuffer
[TestCase("scoped System.Span<int> span; span = l;", TestName = "Local Variable assignment")]
[TestCase("Consume(l);", TestName = "Local passed as argument")]
[TestCase("Consume(p);", TestName = "Parameter passed as argument")]
[TestCase("var foo = new Foo(); Consume(foo.Buffer);", TestName = "Field passed as argument", IgnoreReason = "Issue #330")]
public void Assigning_InlineArrayToSpan_EmitsPrivateImplementationDetailsType(string triggeringStatements)
{
var result = RunCecilifier($$"""
Expand All @@ -47,6 +48,11 @@ public struct IntBuffer
{
private int _element0;
}
class Foo
{
public IntBuffer Buffer;
}
""");

var cecilifiedCode = result.GeneratedCode.ReadToEnd();
Expand Down Expand Up @@ -269,7 +275,7 @@ public struct Buffer { private int _element0; }
[Test]
public void InlineArray_MemberAccess_OnIndex()
{
var result = RunCecilifier($$"""
var result = RunCecilifier("""
class C
{
int M(Buffer b) => b[0].Value;
Expand Down

0 comments on commit 8758ab2

Please sign in to comment.