Open VincentDondain opened 7 years ago
Value? yes, it's not a boolean so there's always value :-)
This is not a case where tons of tests are likely to give tons more value. OTOH it's cheap to test and what's not tested generally does not work (for very long). So having a few tests covering the rules and corner cases seems a very good idea. You'll be quickly hit by the law of diminishing returns if you try to add more.
You can debug the generator using the generator.sln
, just give arguments to the objcgen
project.
Yes, but it's mostly for regressions (since you'll be supplying the input);
Yes, it better be tested (again that will be against known values);
Now if the question was not about unit testing then my answer would likely be different, e.g. writing an ObjC parser to ensure we generated good code against any assembly input.
I would like someone to enlighten me on the benefits / non benefits of unit testing
GetSignatures
andNameGenerator
.I know that the current way to test the generated code is to add a bunch of managed code that's supposed to cover all the corner cases and assert it works in objective-c using XCTest.
Meaning that the simple way the objective-c code compiles is fine.
However having extra tests in
objcgen
would IMHO bring the following advantages:NameGenerator
logic:Does that make sense? Is there even more value in testing this?