You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
308 B
C
15 lines
308 B
C
#include <fmt.h>
|
|
#include <str.h>
|
|
#include <assert.h>
|
|
|
|
main() {
|
|
char buf[1024];
|
|
|
|
assert(fmt_long(0,12345)==5);
|
|
assert(fmt_long(0,-12345)==6);
|
|
assert(fmt_long(buf,12345)==5); buf[5]=0;
|
|
assert(str_equal(buf,"12345"));
|
|
assert(fmt_long(buf,-12345)==6); buf[6]=0;
|
|
assert(str_equal(buf,"-12345"));
|
|
}
|