Uh oh!
There was an error while loading. Please reload this page.
Make test libraries configuration agnostic - #378
Conversation
ccc7a1e to
eddcfe4CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Is there a good reason to keep TRACE defined?
There was a problem hiding this comment.
It doesn't seem like it. From doing a grep, I saw that there are only a few usages of this constant, but the projects that use it, either define it on the files or on the csproj itself.
Should we just remove those conditionals and defines? It seems like it is always defined, therefore, those methods are always available?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jkotas
commented
Nov 28, 2019
A better way to do this may be to |
I would scope this change to:
But I would keep |
ViktorHofer
commented
Dec 5, 2019
I gave this more thought as well and I agree with Jan that we shouldn't undefine DEBUG. |
Yeah there where a couple in some Diagnostics tests.
Ok. I will work on that. |
eddcfe4 to
b3eec67Comparesafern
commented
Dec 18, 2019
@jkotas@ViktorHofer could you please take a look? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
safern
commented
Dec 18, 2019
Fixed all comments. Thanks for the review. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In order to be able to build tests in one configuration and then use a shared framework that was built against another configuration we need to make our tests to test for specific behavior with an
||.If this could introduce bugs where a Release code could be returning valid values for Debug but that's wrong, I'm happy to change this to do runtime checks instead, anyway we should not be testing framework configuration specific behavior based on the configuration the tests were built.
For Contracts tests, I did leave Configuration dependency, as that depends on what the test assembly was built against but not what shared framework we're running on. So Debug test assembly should work on Release and Debug shared framework. Also if the test assembly is built for Release mode it should work on any shared framework.