RoslynClrHeapAllocationAnalyzer
RoslynClrHeapAllocationAnalyzer copied to clipboard
Look at emitted IL in tests
Issue #8 discusses whether we can look at the actual IL or not to determine heap allocations. The conclusion is that it would be too expensive.
I think, however, that it would be of value to add tests where we examine the emitted IL in order to ensure that what is reported is still relevant.
For example, testing the emitted code for string.Format("{0}", 1) and expecting a boxing operation will catch when it is no longer necessary if dotnet/corefx#1514 is fixed (and unit test project running that version).