Hello,
I try to make a unit test where the outcome must be (1,2)
So I did this :
unitTests = testGroup "Unit tests"
[ testCase "MaxOccurs 1 1 " $
1 1 maxOccurs 1 1 @=? (1,2)
]
but now I see these error messages :
/home/nitrous/code/maxOccurs/test/Spec.hs:14:7:
No instance for (Num
(a0 -> (Int -> Int -> (Int, Int)) -> a1 -> a2 -> (t0, t1)))
(maybe you haven't applied enough arguments to a function?)
arising from the literal ‘1’
In the expression: 1
In the first argument of ‘(@=?)’, namely ‘1 1 maxOccurs 1 1’
In the second argument of ‘($)’, namely
‘1 1 maxOccurs 1 1 @=? (1, 2)’
/home/nitrous/code/maxOccurs/test/Spec.hs:14:9:
No instance for (Num a0) arising from the literal ‘1’
The type variable ‘a0’ is ambiguous
Note: there are several potential instances:
instance Num Integer -- Defined in ‘GHC.Num’
instance Num QuickCheckMaxRatio
-- Defined in ‘Test.Tasty.QuickCheck’
instance Num QuickCheckMaxSize
-- Defined in ‘Test.Tasty.QuickCheck’
...plus six others
In the first argument of ‘1’, namely ‘1’
In the first argument of ‘(@=?)’, namely ‘1 1 maxOccurs 1 1’
In the second argument of ‘($)’, namely
‘1 1 maxOccurs 1 1 @=? (1, 2)’
/home/nitrous/code/maxOccurs/test/Spec.hs:14:7:
No instance for (Num
(a0 -> (Int -> Int -> (Int, Int)) -> a1 -> a2 -> (t0, t1)))
(maybe you haven't applied enough arguments to a function?)
arising from the literal ‘1’
In the expression: 1
In the first argument of ‘(@=?)’, namely ‘1 1 maxOccurs 1 1’
In the second argument of ‘($)’, namely
‘1 1 maxOccurs 1 1 @=? (1, 2)’
/home/nitrous/code/maxOccurs/test/Spec.hs:14:9:
No instance for (Num a0) arising from the literal ‘1’
The type variable ‘a0’ is ambiguous
Note: there are several potential instances:
instance Num Integer -- Defined in ‘GHC.Num’
instance Num QuickCheckMaxRatio
-- Defined in ‘Test.Tasty.QuickCheck’
instance Num QuickCheckMaxSize
-- Defined in ‘Test.Tasty.QuickCheck’
...plus six others
In the first argument of ‘1’, namely ‘1’
In the first argument of ‘(@=?)’, namely ‘1 1 maxOccurs 1 1’
In the second argument of ‘($)’, namely
‘1 1 maxOccurs 1 1 @=? (1, 2)’
/home/nitrous/code/maxOccurs/test/Spec.hs:14:7:
No instance for (Num
(a0 -> (Int -> Int -> (Int, Int)) -> a1 -> a2 -> (t0, t1)))
(maybe you haven't applied enough arguments to a function?)
arising from the literal ‘1’
In the expression: 1
In the first argument of ‘(@=?)’, namely ‘1 1 maxOccurs 1 1’
In the second argument of ‘($)’, namely
‘1 1 maxOccurs 1 1 @=? (1, 2)’
/home/nitrous/code/maxOccurs/test/Spec.hs:14:9:
No instance for (Num a0) arising from the literal ‘1’
The type variable ‘a0’ is ambiguous
Note: there are several potential instances:
instance Num Integer -- Defined in ‘GHC.Num’
instance Num QuickCheckMaxRatio
-- Defined in ‘Test.Tasty.QuickCheck’
instance Num QuickCheckMaxSize
-- Defined in ‘Test.Tasty.QuickCheck’
...plus six others
In the first argument of ‘1’, namely ‘1’
In the first argument of ‘(@=?)’, namely ‘1 1 maxOccurs 1 1’
In the second argument of ‘($)’, namely
‘1 1 maxOccurs 1 1 @=? (1, 2)’