For some reason when passing arguments to the test via TestCase
attrubute, I get the following error message about the first argument, which in this case is an array:
This is not a valid constant expression or custom attribute value
module GameLogicTest =
open FsUnit
open NUnit.Framework
open GameLogic.Examle
// This is not a valid constant expression or custom attribute value
[<TestCase( [| 1; 2; 3 |], 3, 1,1)>]
let ``let example.`` (a, m, h, c) =
a
|> proof1 m
|> should equal (h,c)
But when removing the last argument, from both the attribute and the method itself, it all works just fine.
[<TestCase( [| 1; 2; 3 |], 3, 1)>]
let ``let example.`` (a, m, h) =
a
|> proof1 m
|> should equal (h,1)
What am I doing wrong? Preferably I would also define a tuple of int * int
but it doesn't seem to work either.
[<Literal>]
). I'm not quite sure what this does to be honest, but perhaps this could be applied here as well? – Cartwell