Migrate the calculator from its own source file into a unit test.