Unit testing - definition

Unit testing involves writing code to test a library by validating that the library behaves as expected with a number of tests which run through it. For certain inputs we are expecting well defined outputs. It solves the problem of giving us confidence to change a library without needing to manually test everything for each change:

See this article in Wikipedia:

https://en.m.wikipedia.org/wiki/Unit_testing