Assume I have a function:
void isUniqueSymbols(string stream)
How to understand that I should provide several examples of how my function works?
I can write something like this:
Input: isUniqueSymbols("abcde");
Output: true;
Input: isUniqueSymbols("abcdee");
Output: false;
But not sure this is correct.
How would you provide examples of working function?
One possibility would be the embed the documentation into code:
This is pretty close to unit testing/viewing unit tests as documentation, for whatever that may be worth.