aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/34 logic ops
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/common/34 logic ops
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'meson/test cases/common/34 logic ops')
-rw-r--r--meson/test cases/common/34 logic ops/meson.build95
1 files changed, 95 insertions, 0 deletions
diff --git a/meson/test cases/common/34 logic ops/meson.build b/meson/test cases/common/34 logic ops/meson.build
new file mode 100644
index 000000000..897054e74
--- /dev/null
+++ b/meson/test cases/common/34 logic ops/meson.build
@@ -0,0 +1,95 @@
+project('logicopts', 'c')
+
+t = true
+f = false
+
+if (true)
+ message('Ok.')
+else
+ error('Not ok.')
+endif
+
+if (false)
+ error('Not ok.')
+else
+ message('Ok.')
+endif
+
+if (f)
+ error('Not ok.')
+else
+ message('Ok.')
+endif
+
+if (t)
+ message('Ok.')
+else
+ error('Not ok.')
+endif
+
+if true and t
+ message('Ok.')
+else
+ error('Not ok.')
+endif
+
+if t and false
+ error('Not ok.')
+else
+ message('Ok.')
+endif
+
+if f and t
+ error('Not ok.')
+else
+ message('Ok.')
+endif
+
+if f or false
+ error('Not ok.')
+else
+ message('Ok.')
+endif
+
+if true or f
+ message('Ok.')
+else
+ error('Not ok.')
+endif
+
+if t or true
+ message('Ok.')
+else
+ error('Not ok.')
+endif
+
+if not true
+ error('Negation failed.')
+else
+ message('Ok.')
+endif
+
+if not f
+ message('Ok.')
+else
+ error('Negation failed.')
+endif
+
+
+if f or f or f or f or f or f or f or f or t
+ message('Ok.')
+else
+ error('Chain of ors failed.')
+endif
+
+if t and t and t and t and t and t and t and t and f
+ error('Chain of ands failed.')
+else
+ message('Ok.')
+endif
+
+if t and t or t
+ message('Ok.')
+else
+ error('Combination of and-or failed.')
+endif