From 5ba8d0218d653bc209ddf132e8ad6ebe5462ef07 Mon Sep 17 00:00:00 2001 From: Sorawee Porncharoenwase Date: Thu, 10 Oct 2024 21:11:29 -0700 Subject: [PATCH] add more if tests --- tests/test-cases/test-if.rkt | 5 +++++ tests/test-cases/test-if.rkt.out | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/test-cases/test-if.rkt b/tests/test-cases/test-if.rkt index e000c62..1c6fc71 100644 --- a/tests/test-cases/test-if.rkt +++ b/tests/test-cases/test-if.rkt @@ -40,3 +40,8 @@ (* 4 10) ; false branch (+ 2 4))) + +(define if10 + (if (< 10 20) ; check if ten is less than twenty + (* 4 10) ; true branch + (+ 2 4))) ; false branch diff --git a/tests/test-cases/test-if.rkt.out b/tests/test-cases/test-if.rkt.out index 0c5d454..a26024f 100644 --- a/tests/test-cases/test-if.rkt.out +++ b/tests/test-cases/test-if.rkt.out @@ -44,3 +44,8 @@ (* 4 10) ; false branch (+ 2 4))) + +(define if10 + (if (< 10 20) ; check if ten is less than twenty + (* 4 10) ; true branch + (+ 2 4))) ; false branch