1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | // okay to copy/adapt test ideas
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <assert.h>
#include "print_integer.h"
int main(int argc, char* argv[]) {
// TEST 1: zero in base 10
print_integer(0, 10, "");
fputc('\n', stdout);
// TEST 2: single digit in base 10
print_integer(4, 10, "");
fputc('\n', stdout);
// TEST 3: multiple digits in base 10?
// OR
// TEST 3: single digit in base 16?
// OR
// TEST 3: signle digit base 10 with prefix
//
// BAD: multiple digits in base 16 with prefix
return EXIT_SUCCESS;
}
/* vim: set tabstop=4 shiftwidth=4 fileencoding=utf-8 noexpandtab: */
|
© Copyright 2024 Alexander J. Quinn & David Burnett This content is protected and may not be shared, uploaded, or distributed.