aboutsummaryrefslogtreecommitdiff
path: root/tests/core/test_i64_varargs.in
diff options
context:
space:
mode:
authorVasilis Kalintiris <ehostunreach@gmail.com>2013-12-14 16:04:52 +0200
committerVasilis Kalintiris <ehostunreach@gmail.com>2013-12-15 20:51:29 +0200
commitc05cdf26c872f76dad82194305c28a53e9123677 (patch)
treeb9c48a759b8b2e58c4714e11aa8cd992de8bd0a4 /tests/core/test_i64_varargs.in
parent94e1d887ffebcbf640fbca19c76331f6dffbff23 (diff)
Fix the indentation of core test input files with clang-format.
Diffstat (limited to 'tests/core/test_i64_varargs.in')
-rw-r--r--tests/core/test_i64_varargs.in55
1 files changed, 27 insertions, 28 deletions
diff --git a/tests/core/test_i64_varargs.in b/tests/core/test_i64_varargs.in
index 94982b51..7d2e4267 100644
--- a/tests/core/test_i64_varargs.in
+++ b/tests/core/test_i64_varargs.in
@@ -1,30 +1,29 @@
+#include <stdio.h>
+#include <stdint.h>
+#include <stdarg.h>
- #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);
+}
- 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
+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);
+ }
+};