From 050ee6d17819e1353902f6ccb9c83a125638c375 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 17 Mar 2025 23:20:12 +0100 Subject: test fwd: test with simplified expression --- test/Main.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Main.hs b/test/Main.hs index 7dbafab..5cc00a1 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -210,7 +210,7 @@ adTestGen name expr envGenerator = withCompiled env (simplifyFix expr) $ \primalSfun -> testGroupCollapse name [adTestGenPrimal env envGenerator expr exprS primalfun primalSfun - ,adTestGenFwd env envGenerator expr exprS + ,adTestGenFwd env envGenerator exprS ,adTestGenChad env envGenerator expr exprS primalSfun] adTestGenPrimal :: SList STy env -> Gen (SList Value env) @@ -230,14 +230,14 @@ adTestGenPrimal env envGenerator expr exprS primalfun primalSfun = diff outPrimalSI (closeIsh' 1e-8) outPrimalSC adTestGenFwd :: SList STy env -> Gen (SList Value env) - -> Ex env (TScal TF64) -> Ex env (TScal TF64) + -> Ex env (TScal TF64) -> TestTree -adTestGenFwd env envGenerator expr exprS = +adTestGenFwd env envGenerator exprS = withCompiled (dne env) (dfwdDN exprS) $ \dnfun -> testProperty "compile fwdAD" $ property $ do input <- forAllWith (showEnv env) envGenerator dinput <- forAllWith (showEnv (dne env)) $ extendDNE env input - let (outDNI1, outDNI2) = interpretOpen False dinput (dfwdDN expr) + let (outDNI1, outDNI2) = interpretOpen False dinput (dfwdDN exprS) (outDNC1, outDNC2) <- liftIO $ dnfun dinput diff outDNI1 (closeIsh' 1e-8) outDNC1 diff outDNI2 (closeIsh' 1e-8) outDNC2 -- cgit v1.2.3-70-g09d2