Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
109 views

I have a testcase for a complicated function that for unclear reasons tends to hang on certain platforms. I would like to know which test inputs cause the hanging behaviour. I have tried to use ...
sjakobi's user avatar
  • 3,668
0 votes
1 answer
99 views

I'm trying to add the QuickCheck library to my stack project, I've already added it to build depends on the .cabal file and when I run the stack build command I can see that the library was compiled, ...
Lucas Carraro's user avatar
2 votes
1 answer
53 views

I have written a program in whcih I've defined several functions for which I've defined a concrete signature, say work :: Foo -> [(Foo, Bar)] -> [(Foo, Bar)] When approaching QuickCheck-based ...
Enlico's user avatar
  • 30.2k
1 vote
1 answer
80 views

I would like to print the property being tested alongside the argument that caused failure. So, I am trying to solve the second part of the problem by using Debug.Dump from the dump package. This is a ...
F. Zer's user avatar
  • 1,311
1 vote
2 answers
128 views

I want to be able to use quickCheckAll to run a number of tests together. At the same time, I need to specify size constraints on my tests. In the following program, there are two tests that are ...
Geoffrey Warne's user avatar
1 vote
0 answers
63 views

I am developing a property based test generator in Erlang. I have developed all the properties successfully, but only model based properties are failed after few tests. Here is my code: ...
Arraytics New's user avatar
0 votes
1 answer
117 views

Please consider the following piece of code: -- Represents a parsing result of an ANSI coded string. data Slice = Slice { text :: String, color :: Color } newtype Color = Color { string :: ...
Refael Sheinker's user avatar
0 votes
0 answers
167 views

I am having issues with installing QuickCheck for Haskell using GHC 9.4.4 and GHC 8.8.4, and I get the same output. Any assistance would be greatly appreciated! Resolving dependencies... cabal: Could ...
OwlZeroOne's user avatar
1 vote
0 answers
31 views

Whenever I have tried to use Quiviq I am not able to run it within the eunit:test/2. Is there a way to do so, such that you can get the Eunit report, but also showing in detail if the Quiviq fails and ...
Piskator's user avatar
  • 657
1 vote
1 answer
112 views

I would like to check that homomorphism Applicative law holds for datatype BinTree: {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE TypeApplications #-} {-# ...
F. Zer's user avatar
  • 1,311
0 votes
1 answer
63 views

I'm trying to write a QuickCheck property that uses cover to make sure that the test data covers certain cases in combination with the fact that the test involves an IO action. The problem essentially ...
l7r7's user avatar
  • 1,358
3 votes
1 answer
159 views

I want to generate stateful functions (C signature T f()) with QuickCheck as arguments for foreign functions. Preferably I also want to make them (or their inner s->(T,s)) showable. I know that for ...
Johannes Riecken's user avatar
1 vote
1 answer
235 views

Hi I am trying to learn quickcheck (quviq) in erlang and I have come across an exercise where I have to test a simulated cache with symbolic calls. However I encounter problems because I get an 31> ...
Piskator's user avatar
  • 657
0 votes
1 answer
198 views

I have the following struct: pub struct Restriction { pub min: Option<u64>, pub max: Option<u64>, } for which I have defined Arbitrary as follows: impl Arbitrary for Restriction { ...
James Burton's user avatar
0 votes
1 answer
735 views

I'm learning to build a Haskell package. One thing I'm stuck with is running tests with QuickCheck. Specifically, how can I configure the number of trials to run? Here is my test file (Test.hs) with a ...
Hongtao Yang's user avatar
1 vote
1 answer
240 views

I am working on a problem set where I must write an arbitrary instance for binary search trees. Here is the code I've written so far: data Tree e = E | N (Tree e) e (Tree e) insert :: (Ord e) => e ...
sucks-at-javascript's user avatar
3 votes
1 answer
495 views

I'm currently writing a Haskell library to replace a closed-source 3rd party command line application. This 3rd party CLI has a spec that I've replicated, but the actually binary allows much more ...
danielbeard's user avatar
  • 9,137
3 votes
2 answers
245 views

I'm struggling with the semantics of where within do blocks, specifically with Test.Hspec. The following works: module ExampleSpec where import Test.Hspec import Test.QuickCheck spec :: Spec spec = ...
Ben Heilman's user avatar
2 votes
1 answer
227 views

I'm trying to write the following test for an implementation of the dyadic rational numbers. import Numeric.Natural import Test.Hspec import Test.Hspec.QuickCheck import Dyadics dyadic_add :: ...
Alex Altair's user avatar
  • 3,785
1 vote
2 answers
148 views

wrote the code below and am getting some issues with it : The error I am getting is : Data constructor not in scope: Int :: Int If I eradicate the Numeric Int element from my array the code works ...
harleengulati03's user avatar
0 votes
1 answer
194 views

I have recently started exploring property based testing using junit-quickcheck. I came across an usecase where a property has to take a list of entities(I have a generator for a standalone entity). I ...
Kranthi's user avatar
  • 47
1 vote
1 answer
173 views

I would like to create a quickcheck generator to generate a data structure like a tree. Due to the specifics caracteristics of this structure I would like the value to be generated according to its ...
JeanJouX's user avatar
  • 2,741
0 votes
1 answer
254 views

I want to check functor laws for instance: instance Functor Stream where fmap f (x :> xs) = (f x) :> fmap f xs where Stream is data Stream a = a :> Stream a I use QuickCheck.Classes (...
Alimagadov K.'s user avatar
3 votes
1 answer
127 views

I roll my own elem function called elem' elem' :: (Eq a) => a -> [a] -> Bool elem' n ys = foldl (\acc p -> if (p == n) then True else False) False ys Seems to work but I want to ...
wide_eyed_pupil's user avatar
0 votes
2 answers
594 views

I have a generator which is generating a completely json scripts with random keys and values(quickcheck.generator). I want to read this string and get the values of the keys. The problem is that each ...
Mahdis Ghaffarian's user avatar

1
2 3 4 5
9