aboutsummaryrefslogtreecommitdiff
path: root/test/formatters/samplecode/clang-format
diff options
context:
space:
mode:
authorRadon Rosborough <radon.neon@gmail.com>2022-01-05 15:35:12 -0800
committerGitHub <noreply@github.com>2022-01-05 15:35:12 -0800
commit53f243b111b18f49d910d1501b5795a1ec045420 (patch)
tree785538e39d04a00bc43507224f0ad6a4c89f297d /test/formatters/samplecode/clang-format
parent41fa1f70ee01cd2ab3ab90f6fe4c4fc0819c2f96 (diff)
Add formatter tests (#72)
Closes #24 Builds on #25 by @PrimaryCanary
Diffstat (limited to 'test/formatters/samplecode/clang-format')
-rw-r--r--test/formatters/samplecode/clang-format/in.c2
-rw-r--r--test/formatters/samplecode/clang-format/out.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/test/formatters/samplecode/clang-format/in.c b/test/formatters/samplecode/clang-format/in.c
new file mode 100644
index 0000000..07aa90b
--- /dev/null
+++ b/test/formatters/samplecode/clang-format/in.c
@@ -0,0 +1,2 @@
+// https://www.ioccc.org/2020/burton/prog.c
+int main(int b,char**i){long long n=B,a=I^n,r=(a/b&a)>>4,y=atoi(*++i),_=(((a^n/b)*(y>>T)|y>>S)&r)|(a^r);printf("%.8s\n",(char*)&_);}
diff --git a/test/formatters/samplecode/clang-format/out.c b/test/formatters/samplecode/clang-format/out.c
new file mode 100644
index 0000000..40e9e60
--- /dev/null
+++ b/test/formatters/samplecode/clang-format/out.c
@@ -0,0 +1,6 @@
+// https://www.ioccc.org/2020/burton/prog.c
+int main(int b, char **i) {
+ long long n = B, a = I ^ n, r = (a / b & a) >> 4, y = atoi(*++i),
+ _ = (((a ^ n / b) * (y >> T) | y >> S) & r) | (a ^ r);
+ printf("%.8s\n", (char *)&_);
+}