[Git][ghc/ghc][wip/ioref-swap-xchg] testsuite: Add test for atomicSwapIORef#

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Mar 16 00:55:38 UTC 2023



Ben Gamari pushed to branch wip/ioref-swap-xchg at Glasgow Haskell Compiler / GHC


Commits:
e4a03ad6 by Ben Gamari at 2023-03-15T20:55:24-04:00
testsuite: Add test for atomicSwapIORef#

- - - - -


2 changed files:

- + libraries/base/tests/AtomicSwapIORef.hs
- libraries/base/tests/all.T


Changes:

=====================================
libraries/base/tests/AtomicSwapIORef.hs
=====================================
@@ -0,0 +1,7 @@
+import Data.IORef
+
+main :: IO ()
+main = do
+    r <- newIORef 42 :: IO Int
+    atomicSwapIORef r 43
+    readIORef r >>= print


=====================================
libraries/base/tests/all.T
=====================================
@@ -297,3 +297,4 @@ test('T22816', normal, compile_and_run, [''])
 test('trace', normal, compile_and_run, [''])
 test('listThreads', js_broken(22261), compile_and_run, [''])
 test('inits1tails1', normal, compile_and_run, [''])
+test('AtomicSwapIORef', normal, compile_and_run, [''])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e4a03ad6c01b5ec82075d0cb58ff8dda7906fe7b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e4a03ad6c01b5ec82075d0cb58ff8dda7906fe7b
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230315/77689024/attachment.html>


More information about the ghc-commits mailing list