summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-03-17 23:20:12 +0100
committerTom Smeding <tom@tomsmeding.com>2025-03-17 23:20:12 +0100
commit050ee6d17819e1353902f6ccb9c83a125638c375 (patch)
treea78bad95d8dd7776d7de492b0c8ce6d6893568f4
parentdee165294d6b92b153a0b65e21f58f8073186d68 (diff)
test fwd: test with simplified expressionHEADmaster
-rw-r--r--test/Main.hs8
1 files 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