Update testing framework - #646
Conversation
Merge duplicate code under a new class CXXMethodDeclarationCSharpTest
|
Although I think this is an improvement over what was there (and I would appreciate a merge), I don't think it's a good long-term solution to the problem. I occasionally work on ILSpy, which I think has a great system for unit testing. Every test method has a pair of files (corresponding to input and output) and a set of multiple options on which to test. The output files are whitespace flexible and support macros for altering the expected output based on testing options. In our case, the set of macros would likely include:
They use a custom class for comparing program output with expected output. |
I am not a fan of checking in what are effectively "baseline" files or building up complex infrastructure (which effectively needs its own testing) to run these tests. The current approach had been done with because it was simple. What was largely missing was the sharing of the test between versions when it was identical (what this PR largely fixes) to avoid unnecessary duplication. There is then another factor where the Part of it could potentially be done by just having clear hierarchy to the tests. |
Merge duplicate code under a new class
CXXMethodDeclarationCSharpTest