{"id":18575,"date":"2017-08-08T14:04:41","date_gmt":"2017-08-08T18:04:41","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=18575"},"modified":"2017-08-08T14:04:41","modified_gmt":"2017-08-08T18:04:41","slug":"quickcheck-for-swift","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2017\/08\/08\/quickcheck-for-swift\/","title":{"rendered":"QuickCheck for Swift"},"content":{"rendered":"<p><a href=\"https:\/\/github.com\/typelift\/SwiftCheck\">SwiftCheck<\/a> (via <a href=\"https:\/\/andybargh.com\/swiftdevelopments-99\/\">Andy Bargh<\/a>):<\/p>\n<blockquote cite=\"https:\/\/github.com\/typelift\/SwiftCheck\">\n<p>What makes QuickCheck unique is the notion of <em>shrinking<\/em> test cases.  When fuzz\ntesting with arbitrary data, rather than simply halt on a failing test, SwiftCheck\nwill begin whittling the data that causes the test to fail down to a minimal\ncounterexample.<\/p>\n<p>[&#8230;]<\/p>\n<p>SwiftCheck implements random generation for most of the types in the Swift\nStandard Library. Any custom types that wish to take part in testing must\nconform to the included <code>Arbitrary<\/code> protocol.  For the majority of types, this\nmeans providing a custom means of generating random data and shrinking down to\nan empty array.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>SwiftCheck (via Andy Bargh): What makes QuickCheck unique is the notion of shrinking test cases. When fuzz testing with arbitrary data, rather than simply halt on a failing test, SwiftCheck will begin whittling the data that causes the test to fail down to a minimal counterexample. [&#8230;] SwiftCheck implements random generation for most of the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"","apple_news_api_id":"","apple_news_api_modified_at":"","apple_news_api_revision":"","apple_news_api_share_url":"","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[74,71,901,268],"class_list":["post-18575","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-opensource","tag-programming","tag-swift-programming-language","tag-testing"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18575","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=18575"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18575\/revisions"}],"predecessor-version":[{"id":18576,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/18575\/revisions\/18576"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=18575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=18575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=18575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}