"Dimitrie O. Paun" dimi@cs.toronto.edu writes:
Now, on a different note, you pointed out an interesting thing: we need to test mixed A/W cases. We thus have four possible cases: (A,A), (A,W), (W,A), (W,W) Should we test all of them?
We must test everything that is part of the expected behavior of the function. What this means depends on what the function does. In some cases we have to test combinations, in other cases we don't.
<rant> Writing tests is not simply a matter of taking a template and filling in the name of the function you are testing; it requires studying the API documentation, investigating the function behavior, and then devising ways to test that behavior. These ways will likely be different for just about every function. It requires thought and creativity, not simply applying a recipe. </rant>
What is supposed to happen when we have a W->A conversion involving Unicode char which so not map to A?
They get mapped to the default char, usually '?'.