summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00058-if_chain.c
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2021-05-19 16:22:10 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2021-05-19 19:14:52 +0900
commit71fb4a139179e9d27070f7f3e98971e3e029697f (patch)
tree92fbf03f1e546b3c99e6e06e98100b6ef8e4e2c6 /debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00058-if_chain.c
parent6eae1a16a1001287ef5129db86f4ef2145ace3ca (diff)
downloadextra-dependencies-71fb4a139179e9d27070f7f3e98971e3e029697f.tar.gz
extra-dependencies-71fb4a139179e9d27070f7f3e98971e3e029697f.zip
uncrustify: updated to version 0.73
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00058-if_chain.c')
-rw-r--r--debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00058-if_chain.c69
1 files changed, 69 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00058-if_chain.c b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00058-if_chain.c
new file mode 100644
index 00000000..ba15dc8e
--- /dev/null
+++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/tests/expected/c/00058-if_chain.c
@@ -0,0 +1,69 @@
+void foo(void)
+{
+ if (cond_a) {
+ fcn_a(); fcn_b();
+ } else {
+ fcn_c();
+ } if (cond_b) {
+ fcn_d();
+ } else {
+ fcn_e();
+ } if (cond_c) {
+ fcn_f(); fcn_g();
+ } else {
+ fcn_h();
+ } if (cond_d) {
+ fcn_i();
+ } else {
+ fcn_j(); fcn_k();
+ } if (cond_e) {
+ fcn_l();
+ } else {
+ fcn_m();
+ } if (cond_f) {
+ fcn_n();
+ } else if (cond_g) {
+ fcn_o(); while (cond_g) {
+ fcn_p();
+ }
+ } else if (cond_h) {
+ while (cond_i) {
+ fcn_q(); fcn_r();
+ }
+ } else {
+ fcn_s();
+ }
+}
+/* this next bit test whether vbraces can be successfully converted
+ * when the closing brace is in an #ifdef.
+ * Note that the author should have braced the code to begin with.
+ */
+void bar(void)
+{
+ if (jiffies >= hw_priv->Counter[ port ].time) {
+ hw_priv->Counter[ port ].fRead = 1; if (port == MAIN_PORT) {
+ hw_priv->Counter[ MAIN_PORT ].time = jiffies + HZ * 6;
+ } else {
+ hw_priv->Counter[ port ].time =
+
+#ifdef SOME_DEFINE
+ hw_priv->Counter[ port - 1 ].time + HZ * 2;
+ }
+
+#else /* ifdef SOME_DEFINE */
+ hw_priv->Counter[ MAIN_PORT ].time + HZ * 2;
+#endif /* ifdef SOME_DEFINE */
+ }
+}
+void funct(int v1, int v2, int v3)
+{
+ if ( v1 ) {
+ if ( v2 ) {
+ f1();
+ }
+ } else {
+ if ( v3 ) {
+ f2();
+ }
+ }
+}