aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/Main.hs b/test/Main.hs
index d586973..358073f 100644
--- a/test/Main.hs
+++ b/test/Main.hs
@@ -351,7 +351,7 @@ adTestGenChad testname config env envGenerator expr exprS primalSfun | Dict <- e
dtermSChad0 = ELet ext (EConst ext STF64 1.0) $ chad' config env exprS
dtermSChadS = simplifyFix dtermSChad0
dtermSChadSUS = simplifyFix $ unMonoid dtermSChadS
- dtermSChadSUSP = pruneExpr env dtermSChadSUS
+ dtermSChadSUSP = simplifyFix $ pruneExpr env dtermSChadSUS
in
withResource' (do (fun, output) <- makeFwdADArtifactCompile env exprS
when (not (null output)) $
@@ -711,6 +711,9 @@ tests_AD = testGroup "AD"
,adTestTp "fold-freearr" (C "" 1) $ fromNamed $ lambda @(TArr N1 R) #a $ body $
idx0 $ fold1i (#x :-> #y :-> #x * #y + #a ! pair nil 0) 1 #a
+
+ ,adTest "map" $ fromNamed $ lambda @(TArr N1 R) #a $ body $
+ idx0 $ sum1i $ map_ (#x :-> 2 * #x) #a
]
main :: IO ()