{"action":"created","issue":{"url":"https://api.github.com/repos/dserban/StateMachineTestingWithQuickCheck/issues/12","repository_url":"https://api.github.com/repos/dserban/StateMachineTestingWithQuickCheck","labels_url":"https://api.github.com/repos/dserban/StateMachineTestingWithQuickCheck/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/dserban/StateMachineTestingWithQuickCheck/issues/12/comments","events_url":"https://api.github.com/repos/dserban/StateMachineTestingWithQuickCheck/issues/12/events","html_url":"https://github.com/dserban/StateMachineTestingWithQuickCheck/issues/12","id":162914786,"number":12,"title":"QuickCheck probleme arbitrary","user":{"login":"Thomas1995","id":14806605,"avatar_url":"https://avatars.githubusercontent.com/u/14806605?v=3","gravatar_id":"","url":"https://api.github.com/users/Thomas1995","html_url":"https://github.com/Thomas1995","followers_url":"https://api.github.com/users/Thomas1995/followers","following_url":"https://api.github.com/users/Thomas1995/following{/other_user}","gists_url":"https://api.github.com/users/Thomas1995/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas1995/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas1995/subscriptions","organizations_url":"https://api.github.com/users/Thomas1995/orgs","repos_url":"https://api.github.com/users/Thomas1995/repos","events_url":"https://api.github.com/users/Thomas1995/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas1995/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-29T12:39:21Z","updated_at":"2016-07-01T15:15:30Z","closed_at":null,"body":"@dserban \r\n\r\nAm inceput sa lucrez la partea cu mongodb, insa aparent QuickCheck are niste probleme si nu inteleg care ar putea fi acestea. De exemplu, din urmatoarea secventa de cod:\r\n\r\n```\r\ninstance Arbitrary CustomPostList where\r\n arbitrary = do\r\n   size <- arbitrary\r\n   list <- vectorOf (size `mod` maxCustomListSize + minCustomListSize) (arbitrary :: Gen CustomPost)\r\n   return $ MkCustomPostList list\r\n```\r\n\r\nsize este mereu 0\r\n\r\n```\r\ninstance Arbitrary CustomPost where\r\n arbitrary = do\r\n   value <- listOf1 genSafeChar\r\n   return $ MkCustomPost $ [\"value\" =: value]\r\n  where\r\n   genSafeChar = elements $ ['a'..'z'] ++ ['A'..'Z'] ++ ['0'..'9']\r\n```\r\n\r\nAici, in acelasi mod, listOf1 returneaza de fiecare data o secventa aleatorie de lungime 1 (de fiecare data, adica lungimea nu se schimba).\r\n\r\nNu inteleg care ar putea fi problema. Intregul cod [aici](https://github.com/Thomas1995/StateMachineTestingWithQuickCheck/blob/master/mongodb/mongo_big_insertions.hs)."},"comment":{"url":"https://api.github.com/repos/dserban/StateMachineTestingWithQuickCheck/issues/comments/229973311","html_url":"https://github.com/dserban/StateMachineTestingWithQuickCheck/issues/12#issuecomment-229973311","issue_url":"https://api.github.com/repos/dserban/StateMachineTestingWithQuickCheck/issues/12","id":229973311,"user":{"login":"dserban","id":400925,"avatar_url":"https://avatars.githubusercontent.com/u/400925?v=3","gravatar_id":"","url":"https://api.github.com/users/dserban","html_url":"https://github.com/dserban","followers_url":"https://api.github.com/users/dserban/followers","following_url":"https://api.github.com/users/dserban/following{/other_user}","gists_url":"https://api.github.com/users/dserban/gists{/gist_id}","starred_url":"https://api.github.com/users/dserban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dserban/subscriptions","organizations_url":"https://api.github.com/users/dserban/orgs","repos_url":"https://api.github.com/users/dserban/repos","events_url":"https://api.github.com/users/dserban/events{/privacy}","received_events_url":"https://api.github.com/users/dserban/received_events","type":"User","site_admin":false},"created_at":"2016-07-01T15:15:30Z","updated_at":"2016-07-01T15:15:30Z","body":"@Thomas1995\r\nPentru partea cu size, incearca artificiul pe care l-am folosit si eu in exemplul cu \"circular buffer\", si anume:\r\n```\r\nactionListLength <- choose (1,50)\r\n```"}}
{"actor":{"display_login":"dserban"}}