mirror of
https://github.com/fumiama/base16384.git
synced 2026-06-07 11:10:29 +08:00
chore(ci): make lint happy
This commit is contained in:
@@ -29,8 +29,7 @@ char tstbuf[BASE16384_ENCBUFSZ];
|
|||||||
if (has_failed) { \
|
if (has_failed) { \
|
||||||
perror(reason); \
|
perror(reason); \
|
||||||
return 1; \
|
return 1; \
|
||||||
} \
|
}
|
||||||
fputs(reason " run successfully\n", stderr);
|
|
||||||
|
|
||||||
#define loop_ok(has_failed, i, reason) \
|
#define loop_ok(has_failed, i, reason) \
|
||||||
if (has_failed) { \
|
if (has_failed) { \
|
||||||
@@ -87,7 +86,7 @@ char tstbuf[BASE16384_ENCBUFSZ];
|
|||||||
ok(!fp, "fopen"); \
|
ok(!fp, "fopen"); \
|
||||||
ok(fwrite(encbuf, TEST_SIZE, 1, fp) != 1, "fwrite"); \
|
ok(fwrite(encbuf, TEST_SIZE, 1, fp) != 1, "fwrite"); \
|
||||||
ok(fclose(fp), "fclose"); \
|
ok(fclose(fp), "fclose"); \
|
||||||
fputs("input file created.", stderr);
|
fputs("input file created.\n", stderr);
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
@@ -101,13 +100,15 @@ int main() {
|
|||||||
for(i = TEST_SIZE; i > 0; i--) {
|
for(i = TEST_SIZE; i > 0; i--) {
|
||||||
reset_and_truncate(fd, i);
|
reset_and_truncate(fd, i);
|
||||||
loop_ok(close(fd), i, "close");
|
loop_ok(close(fd), i, "close");
|
||||||
|
fputs("base16384_encode_file\n", stderr);
|
||||||
err = base16384_encode_file(TEST_INPUT_FILENAME, TEST_OUTPUT_FILENAME, encbuf, decbuf);
|
err = base16384_encode_file(TEST_INPUT_FILENAME, TEST_OUTPUT_FILENAME, encbuf, decbuf);
|
||||||
base16384_loop_ok(err);
|
base16384_loop_ok(err);
|
||||||
|
fputs("base16384_decode_file\n", stderr);
|
||||||
err = base16384_decode_file(TEST_OUTPUT_FILENAME, TEST_VALIDATE_FILENAME, encbuf, decbuf);
|
err = base16384_decode_file(TEST_OUTPUT_FILENAME, TEST_VALIDATE_FILENAME, encbuf, decbuf);
|
||||||
base16384_loop_ok(err);
|
base16384_loop_ok(err);
|
||||||
|
fputs("validate_result\n", stderr);
|
||||||
validate_result();
|
validate_result();
|
||||||
|
fputs("fin\n\n", stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
fputs("testing base16384_en/decode_fp...\n", stderr);
|
fputs("testing base16384_en/decode_fp...\n", stderr);
|
||||||
|
|||||||
Reference in New Issue
Block a user