@@ -3,7 +3,6 @@ module GraphBLAS.FSharp.Tests.Backend.Common.ClArray.Concat
33open Expecto
44open Brahma.FSharp
55open GraphBLAS.FSharp .Backend .Common
6- open GraphBLAS.FSharp .Test
76open GraphBLAS.FSharp .Tests
87open GraphBLAS.FSharp .Backend .Objects .ArraysExtensions
98open GraphBLAS.FSharp .Backend .Objects .ClContext
@@ -12,13 +11,12 @@ let context = Context.defaultContext.ClContext
1211
1312let processor = Context.defaultContext.Queue
1413
15- let config =
16- { Utils.defaultConfig with
17- arbitrary = [ typeof< Generators.ArrayAndChunkPositions> ] }
14+ let config = Utils.defaultConfig
1815
19- let makeTest < 'a > isEqual testFun ( arrays : 'a [] seq ) =
16+ let makeTest < 'a > isEqual testFun ( arrays : 'a [] [] ) =
2017
21- if Seq.length arrays > 0 then
18+ if Seq.length arrays > 0
19+ && arrays |> Seq.forall ( fun array -> array.Length > 0 ) then
2220
2321 let clArrays = arrays |> Seq.map context.CreateClArray
2422
@@ -35,14 +33,15 @@ let makeTest<'a> isEqual testFun (arrays: 'a [] seq) =
3533
3634let createTest < 'a > isEqual =
3735 ClArray.concat context Utils.defaultWorkGroupSize
38- |> makeTest isEqual
36+ |> makeTest< 'a > isEqual
3937 |> testPropertyWithConfig config $" test on %A {typeof<'a>}"
4038
4139let tests =
4240 [ createTest< int> (=)
4341
4442 if Utils.isFloat64Available context.ClDevice then
45- createTest< float> (=)
43+ createTest< float> Utils.floatIsEqual
4644
47- createTest< float32> (=)
45+ createTest< float32> Utils.float32IsEqual
4846 createTest< bool> (=) ]
47+ |> testList " Concat"
0 commit comments