Skip to content

Commit

Permalink
More stringent test; Fix indentation (of the code itself, not in the …
Browse files Browse the repository at this point in the history
…generator)
  • Loading branch information
Saalvage authored and tritao committed Oct 18, 2023
1 parent ebe6b8a commit 20950c5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions tests/dotnet/CSharp/CSharp.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,8 @@ public void TestPointerToClass()
[Test]
public void TestValueTypeOutParameter()
{
CSharp.CSharp.ValueTypeOutParameter(out var unionTest);
Assert.AreEqual(2, unionTest.A);
CSharp.CSharp.ValueTypeOutParameter(out var unionTestA, out var unionTestB);
Assert.AreEqual(2, unionTestA.A);
Assert.AreEqual(2, unionTestB.B);
}
}
5 changes: 3 additions & 2 deletions tests/dotnet/CSharp/CSharp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1792,7 +1792,8 @@ bool PointerTester::IsValid()

PointerTester* PointerToClass = &internalPointerTesterInstance;

void ValueTypeOutParameter(UnionTester* tester)
void ValueTypeOutParameter(UnionTester* testerA, UnionTester* testerB)
{
tester->a = 2;
testerA->a = 2;
testerB->b = 2;
}
2 changes: 1 addition & 1 deletion tests/dotnet/CSharp/CSharp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1609,4 +1609,4 @@ union DLL_API UnionTester {
int b;
};

void DLL_API ValueTypeOutParameter(CS_OUT UnionTester* tester);
void DLL_API ValueTypeOutParameter(CS_OUT UnionTester* testerA, CS_OUT UnionTester* testerB);

0 comments on commit 20950c5

Please sign in to comment.