diff --git a/MIP-glpk/test/TestSuite.hs b/MIP-glpk/test/TestSuite.hs index da7e01d..9812f9d 100644 --- a/MIP-glpk/test/TestSuite.hs +++ b/MIP-glpk/test/TestSuite.hs @@ -1,4 +1,4 @@ --- {-# OPTIONS_GHC -Wall -Wno-unused-top-binds #-} +{-# OPTIONS_GHC -Wall -Wno-unused-top-binds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} @@ -51,16 +51,19 @@ case_glpk_infeasible = do case_glpk_thread_safe :: Assertion case_glpk_thread_safe = when rtsSupportsBoundThreads $ do - t <- asyncBound $ do - ret <- Raw.glp_init_env - ret @?= 0 + th1 <- asyncBound $ do + Raw.glp_init_env >>= (@?= 0) + Raw.glp_init_env >>= (@?= 1) th2 <- asyncBound $ do - ret <- Raw.glp_init_env - ret @?= 0 - void $ Raw.glp_free_env + Raw.glp_init_env >>= (@?= 0) + Raw.glp_init_env >>= (@?= 1) + _ <- Raw.glp_free_env + Raw.glp_init_env >>= (@?= 0) wait th2 - void $ Raw.glp_free_env - wait t + Raw.glp_init_env >>= (@?= 1) + _ <- Raw.glp_free_env + Raw.glp_init_env >>= (@?= 0) + wait th1 -- ------------------------------------------------------------------------