At this moment, i am writing tests to handle comparisons between different KVPair classes, where content differs by the amount of white space in either KVPair.
I am constructing objects as follows:
k = "remember";
v = "It's not a lie, if you believe it";
remember_SingleSpaceOnTargetNoSpaceOnSource = new KVPair(k, v); // notice var name
...
This quickly broke down when i had to create more complex tests.
How would you name a variable, key characteristic of which is space2Tabs3SpacesContent and still have an idea what this means a month from now?
Ultimately as part of my tests, i need to cover cases of:
{various spaces} content {various spaces}
content {various spaces}
{various spaces} content
Any suggestions on how to best structure this for ease of testing?
If this variable is local (used inside single sub or function), I would use comments, since it is really hard to put all the meaning into the name.
For example
Using comments is the best way to remember something in two months 😉