<div dir="ltr">Hello,<div><br></div><div>I'm trying to use quickcheck with test-framework. QuickCheck site says I can use a function called collect to see statistics of data generation. The function "collect" doesn't seem to print anything, though. This is the output I get after running cabal test:<br>
</div><div><br></div><div><div>Running 1 test suites...</div><div>Test suite reference: RUNNING...</div><div>Test suite reference: PASS</div><div>Test suite logged to: dist/test/100doors-0.1-reference.log</div><div>1 of 1 test suites (1 of 1 test cases) passed.</div>
</div><div><br></div><div>This is what I see inside the log:</div><div><br></div><div><div>Test suite reference: RUNNING...</div><div>Main:</div><div> flipped door is different state: [OK, passed 100 tests]</div><div> flipDoors creates a different list of doors unless empty: [OK, passed 100 tests]</div>
<div><br></div><div> Properties Total </div><div> Passed 2 2 </div><div> Failed 0 0 </div><div> Total 2 2 </div><div>Test suite reference: PASS</div>
<div>Test suite logged to: dist/test/100doors-0.1-reference.log</div></div><div><br></div><div>This is my test code (stripping out the boring parts):</div><div><div>instance Arbitrary Door where</div><div> arbitrary = elements [Opened, Closed]</div>
<div><br></div><div>prop_flipped_door_is_different_state door = door /= flipDoor door</div><div><br></div><div>prop_flipDoors_creates_a_different_list_of_doors_unless_empty n doors = collect n $ (not $ null doors) ==> doors /= (flipDoors n doors)</div>
</div><div><br></div><div>[]'s</div><div>Rafael</div></div>