From 3ffb87cf878f38d8aa546b72ba3adaff1a146386 Mon Sep 17 00:00:00 2001 From: Matthew-Mosior Date: Fri, 6 Sep 2024 20:28:02 -0400 Subject: [PATCH] Fixing expected and tests/chez/chez003/IORef.idr to more appropriately test atomicModifyIORef functionality. --- tests/chez/chez003/IORef.idr | 17 +++++++---------- tests/chez/chez003/expected | 1 - 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/tests/chez/chez003/IORef.idr b/tests/chez/chez003/IORef.idr index 7b8b296ae8..5e22448913 100644 --- a/tests/chez/chez003/IORef.idr +++ b/tests/chez/chez003/IORef.idr @@ -14,17 +14,14 @@ main printLn val val <- readIORef y printLn val - z <- newIORef 42 + z <- newIORef 42 val <- readIORef z printLn val - tid1 <- fork $ do + t1 <- fork $ do atomicModifyIORef z (* 2) - val <- readIORef z - printLn val - threadWait tid1 - tid2 <- fork $ do + t2 <- fork $ atomicModifyIORef z (* 2) - val <- readIORef z - printLn val - threadWait tid2 - pure () + threadWait t1 + threadWait t2 + val <- readIORef z + printLn val diff --git a/tests/chez/chez003/expected b/tests/chez/chez003/expected index aad691cac1..2dff5cccaa 100644 --- a/tests/chez/chez003/expected +++ b/tests/chez/chez003/expected @@ -3,5 +3,4 @@ 188 188 42 -84 168