Add a test for PreInitData based on IL#3667
Conversation
MichalStrehovsky
left a comment
There was a problem hiding this comment.
I'm a bit concerned about our ability to keep the C# and IL file in sync. My preference for IL-based tests is to always trim the IL to the bare minimum so that it's understandable on it's own and maintainable by hand.
| @@ -0,0 +1,357 @@ | |||
|
|
|||
There was a problem hiding this comment.
This might need a license header.
| @@ -0,0 +1,9 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
I can't see this in the GitHub UI: does this file have the executable special mode flags (chmod)? Since it's not actually running, not setting them won't be a CI failure.
There was a problem hiding this comment.
Since I copied it from windows it didn't have the flags. I've fixed that.
| // Code size 11 (0xb) | ||
| .maxstack 8 | ||
| IL_0000: ldsfld native int [mscorlib]System.IntPtr::Zero | ||
| IL_0005: stsfld native int Details::PreInitializedField_DataBlob |
There was a problem hiding this comment.
This is an unintentional test of bad IL handling.
There was a problem hiding this comment.
Thanks. I don't need this cctor. Deleted.
I checked under linux there is no ilasm in CLI so that needs a bit of additional work to plumb ILASM through CLI (at least the packages where we can locate ilasm). So this test is windows-only for now.