2 ms·
What do you gain from having a separate language agnostic file? If you are going to have a table, it seems to make sense to have the table next to the code tha
by eru 3y ago
What do you gain from having a separate language agnostic file?
If you are going to have a table, it seems to make sense to have the table next to the code that's using it. (Though I prefer property based testing.)
- yellowapple 3y ago> What do you gain from having a separate language agnostic file? Right now, nothing. In the future, when I overcome my laziness, it's a single place to define tests that multiple projects in multiple languages (in this case, encoding/decoding libraries) need to pass in an identical manner. If I ever identify more edge cases that I need to test, I can add them in one place and all existing implementations would automatically test them, and for future implementations I only need to implement enough to read and loop through the test files and then I'm done. Another advantage comes about in the corporate world (where most of my programming energy has less-than-fortunately gone): having test cases defined in a format like CSV that Excel can edit makes it easier for non-programmers (i.e. the vast majority of stakeholders for the average corporate software project) to read and write the test cases.