Often you may want to test a single piece of code. For example, say you forget how the % operator works with negative numbers, or you must determine how a certain API call operates. Writing, compiling, and running a small program repeatedly just to tes…