Quidest?

want-and-got pattern

ยท Lorenzo Drumond

In testing, the want-and-got pattern works like this: set up a variable want containing the correct result of the operation, call the function under test, and store its result in a variable got. Then compare the two.

References

#programming #golang #for_the_love_of_go #testing #pattern #computer_science #paradigm