diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-06 20:46:30 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:50 +0200 |
commit | 72cbc30fb0898ec61fea669b97c9a31860df81a9 (patch) | |
tree | 1302df2eda7a56a49567951745ba43b89e30546b /tests/core/test_i64_varargs.in | |
parent | ca35cf2e6a10ffcf5ecdca04b2055e65bdf45270 (diff) |
Use do_run_from_file() for test_i64_varargs
Diffstat (limited to 'tests/core/test_i64_varargs.in')
-rw-r--r-- | tests/core/test_i64_varargs.in | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/core/test_i64_varargs.in b/tests/core/test_i64_varargs.in new file mode 100644 index 00000000..94982b51 --- /dev/null +++ b/tests/core/test_i64_varargs.in @@ -0,0 +1,30 @@ + + #include <stdio.h> + #include <stdint.h> + #include <stdarg.h> + + int64_t ccv_cache_generate_signature(char *msg, int len, int64_t sig_start, ...) { + if (sig_start < 10123) + printf("%s\n", msg+len); + va_list v; + va_start(v, sig_start); + if (sig_start > 1413) + printf("%d\n", va_arg(v, int)); + else + printf("nada\n"); + va_end(v); + return len*sig_start*(msg[0]+1); + } + + int main(int argc, char **argv) + { + for (int i = 0; i < argc; i++) { + int64_t x; + if (i % 123123 == 0) + x = ccv_cache_generate_signature(argv[i], i+2, (int64_t)argc*argc, 54.111); + else + x = ccv_cache_generate_signature(argv[i], i+2, (int64_t)argc*argc, 13); + printf("%lld\n", x); + } + }; +
\ No newline at end of file |