From 6cd6f66d4b3aebf3d549a2feae05869d5117589a Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 13 Dec 2022 16:09:32 +0100 Subject: [PATCH] add tests for conditions --- tests/24_if-else.test | 9 +++++++++ tests/25_if.test | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 tests/24_if-else.test create mode 100644 tests/25_if.test diff --git a/tests/24_if-else.test b/tests/24_if-else.test new file mode 100644 index 0000000..aea4934 --- /dev/null +++ b/tests/24_if-else.test @@ -0,0 +1,9 @@ +void main () { + bool cab = true; + bool a = cab; + if (a) { + puts("a est vraie\n"); + } else { + puts("a est fausse\n"); + } +} diff --git a/tests/25_if.test b/tests/25_if.test new file mode 100644 index 0000000..9643f43 --- /dev/null +++ b/tests/25_if.test @@ -0,0 +1,9 @@ +void main () { + bool cab = true; + bool a = cab; + if (a) { + puts("a est vraie\n"); + return; + } + puts("a est fausse\n"); +}