Enhancing arithmetic instruction tests with flag register checks