Open MatteoPiovanelli-Laser opened 3 years ago
Does the compiler optimize them away? It should not: those tests are testing the overloaded == operator and look legit. Seems like the right thing to do is to suppress the warnings.
Ok. Makes sense. I don't think they are being optimized away, but I haven't checked in a long time. We were looking to clean up some of the warnings from our solution and those came up, so I thought I'd ask. Thanks for clearing them up.
https://github.com/bleroy/Nwazet.Commerce/blob/3f0e9a0b847437d22aa60662a0f8894456717e19/Nwazet.Commerce.Tests/TimePeriodTests.cs#L185
A bunch of those Assertions raise warning when building the project, because they are made between the same variable. Is there a reason why they need to be like that or can they be safely removed?