-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for pointer types / addressof operator
merge
- Loading branch information
Showing
10 changed files
with
96 additions
and
45 deletions.
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
9 changes: 9 additions & 0 deletions
9
Cecilifier.Core.Tests/TestResources/Integration/Misc/Pointers/AddressOfLocalVariables.cs.txt
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,9 @@ | ||
class C | ||
{ | ||
unsafe int* AddressOfLocalVariables() | ||
{ | ||
int i = 42; | ||
int *p = &i; | ||
return p; | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
Cecilifier.Core.Tests/TestResources/Integration/Misc/Pointers/AddressOfParameters.cs.txt
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,8 @@ | ||
class C | ||
{ | ||
unsafe int* AddressOfParameter(int i) | ||
{ | ||
int *p = &i; | ||
return p; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
....Tests/TestResources/Integration/Misc/Pointers/AssignmentOfAddressOfLocalVariables.cs.txt
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,10 @@ | ||
class C | ||
{ | ||
unsafe int* AddressOfLocalVariables() | ||
{ | ||
int i = 42; | ||
int *p; | ||
p = &i; | ||
return p; | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Cecilifier.Core.Tests/TestResources/Integration/Statements/FixedStatement.cs.txt
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,6 @@ | ||
|
||
unsafe void FixedStatement() | ||
{ | ||
int i = 0; | ||
fixed (int* p = &i) { } | ||
} |
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 |
---|---|---|
@@ -1,28 +1,36 @@ | ||
using NUnit.Framework; | ||
|
||
namespace Cecilifier.Core.Tests.Integration | ||
{ | ||
[TestFixture] | ||
public class MiscTestCase : IntegrationResourceBasedTest | ||
{ | ||
[TestCase("Parameters")] | ||
[TestCase("Parameters2")] | ||
[TestCase("LocalVariables")] | ||
public void TestDelegateInvocation(string storageType) | ||
{ | ||
AssertResourceTest($@"Misc/DelegateInvocation_{storageType}"); | ||
} | ||
|
||
[Test] | ||
public void TestAccessibilityModifiers() | ||
{ | ||
AssertResourceTest(@"Misc/AccessibilityModifiers"); | ||
} | ||
|
||
[Test] | ||
public void TestNamespaces() | ||
{ | ||
AssertResourceTest(@"Misc/Namespaces"); | ||
} | ||
} | ||
} | ||
using NUnit.Framework; | ||
|
||
namespace Cecilifier.Core.Tests.Integration | ||
{ | ||
[TestFixture] | ||
public class MiscTestCase : IntegrationResourceBasedTest | ||
{ | ||
[TestCase("Parameters")] | ||
[TestCase("Parameters2")] | ||
[TestCase("LocalVariables")] | ||
public void TestDelegateInvocation(string storageType) | ||
{ | ||
AssertResourceTest($@"Misc/DelegateInvocation_{storageType}"); | ||
} | ||
|
||
[Test] | ||
public void TestAccessibilityModifiers() | ||
{ | ||
AssertResourceTest(@"Misc/AccessibilityModifiers"); | ||
} | ||
|
||
[Test] | ||
public void TestNamespaces() | ||
{ | ||
AssertResourceTest(@"Misc/Namespaces"); | ||
} | ||
|
||
[TestCase("AddressOfParameters", TestName = "Parameters")] | ||
[TestCase("AddressOfLocalVariables", TestName = "Local Variables")] | ||
[TestCase("AssignmentOfAddressOfLocalVariables", TestName = "Local Variable Assignment")] | ||
public void TestPointerTypes(string testName) | ||
{ | ||
AssertResourceTest($@"Misc/Pointers/{testName}"); | ||
} | ||
} | ||
} |
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
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