Skip to content

Commit

Permalink
nofib: add test for AccelerateHS#93
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcdonell committed Sep 7, 2014
1 parent 75f24f6 commit 82434aa
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Test/Issues.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Test.Issues (
import Config

import Test.Framework
import Test.Issues.Issue93
import Test.Issues.Issue114
import Test.Issues.Issue137
import Test.Issues.Issue168
Expand All @@ -20,7 +21,8 @@ test_issues :: Config -> Test
test_issues conf =
testGroup "issues"
[
test_issue114 conf
test_issue93 conf
, test_issue114 conf
, test_issue137 conf
, test_issue168 conf
, test_issue184 conf
Expand Down
30 changes: 30 additions & 0 deletions Test/Issues/Issue93.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

module Test.Issues.Issue93 (test_issue93)
where

import Config
import ParseArgs
import Test.Base
import Test.Framework
import Test.Framework.Providers.HUnit

import Prelude as P
import Data.Array.Accelerate as A
import Data.Label


test_issue93 :: Config -> Test
test_issue93 conf =
testCase "93" (assertEqual xs $ run backend test1)
where
backend = get configBackend conf


xs :: Array DIM2 Int
xs = fromList (Z :. 1 :. 1) [5]

test1 :: Acc (Array DIM2 Int)
test1 = permute (\c _ -> c) (fill (shape xs') (constant 0)) id xs'
where
xs' = use xs

0 comments on commit 82434aa

Please sign in to comment.