{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/golo-lang/pulls/comments/53247485","id":53247485,"diff_hunk":"@@ -356,3 +356,54 @@ let err, val = trying({\n The error is the left value, the correct one the right (mnemonic: “right” also means “correct”). This allows to deal with error in the same way as Go does for instance.\n \n The decorators `nullify` and `raising` are the duals of `option` or `result`\n+\n+=== Assertions (`gololang.Assertions`)\n+\n+It allows to declare (and test) an expected boolean condition in a program.\n+\n+==== `assert`\n+\n+Ensure that a boolean expression is true at runtime:\n+\n+[source,golo]\n+----\n+assert(-> 5: equals(5))\n+\n+# If you don't provide callback to assert(), a Runtime exception is thrown if the predicate is false","path":"doc/misc.asciidoc","position":17,"original_position":17,"commit_id":"1208be97041b9282230a00ee11fa0a1ab0b98eb1","original_commit_id":"1208be97041b9282230a00ee11fa0a1ab0b98eb1","user":{"login":"danielpetisme","id":593564,"avatar_url":"https://avatars.githubusercontent.com/u/593564?v=3","gravatar_id":"","url":"https://api.github.com/users/danielpetisme","html_url":"https://github.com/danielpetisme","followers_url":"https://api.github.com/users/danielpetisme/followers","following_url":"https://api.github.com/users/danielpetisme/following{/other_user}","gists_url":"https://api.github.com/users/danielpetisme/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpetisme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpetisme/subscriptions","organizations_url":"https://api.github.com/users/danielpetisme/orgs","repos_url":"https://api.github.com/users/danielpetisme/repos","events_url":"https://api.github.com/users/danielpetisme/events{/privacy}","received_events_url":"https://api.github.com/users/danielpetisme/received_events","type":"User","site_admin":false},"body":"Why a `RuntimeException` and not a classic [AssertionError](https://docs.oracle.com/javase/7/docs/api/java/lang/AssertionError.html)?","created_at":"2016-02-17T23:09:49Z","updated_at":"2016-02-17T23:09:49Z","html_url":"https://github.com/eclipse/golo-lang/pull/360#discussion_r53247485","pull_request_url":"https://api.github.com/repos/eclipse/golo-lang/pulls/360","_links":{"self":{"href":"https://api.github.com/repos/eclipse/golo-lang/pulls/comments/53247485"},"html":{"href":"https://github.com/eclipse/golo-lang/pull/360#discussion_r53247485"},"pull_request":{"href":"https://api.github.com/repos/eclipse/golo-lang/pulls/360"}}},"pull_request":{"url":"https://api.github.com/repos/eclipse/golo-lang/pulls/360","id":58639410,"html_url":"https://github.com/eclipse/golo-lang/pull/360","diff_url":"https://github.com/eclipse/golo-lang/pull/360.diff","patch_url":"https://github.com/eclipse/golo-lang/pull/360.patch","issue_url":"https://api.github.com/repos/eclipse/golo-lang/issues/360","number":360,"state":"open","locked":false,"title":"`assert` helpers allow to declare (and test) an expected boolean condition","user":{"login":"k33g","id":491848,"avatar_url":"https://avatars.githubusercontent.com/u/491848?v=3","gravatar_id":"","url":"https://api.github.com/users/k33g","html_url":"https://github.com/k33g","followers_url":"https://api.github.com/users/k33g/followers","following_url":"https://api.github.com/users/k33g/following{/other_user}","gists_url":"https://api.github.com/users/k33g/gists{/gist_id}","starred_url":"https://api.github.com/users/k33g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k33g/subscriptions","organizations_url":"https://api.github.com/users/k33g/orgs","repos_url":"https://api.github.com/users/k33g/repos","events_url":"https://api.github.com/users/k33g/events{/privacy}","received_events_url":"https://api.github.com/users/k33g/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-08T17:19:51Z","updated_at":"2016-02-17T23:09:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee73b9bdbd41d71722a34d9551b6cf1d1fd35cf8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/golo-lang/pulls/360/commits","review_comments_url":"https://api.github.com/repos/eclipse/golo-lang/pulls/360/comments","review_comment_url":"https://api.github.com/repos/eclipse/golo-lang/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/golo-lang/issues/360/comments","statuses_url":"https://api.github.com/repos/eclipse/golo-lang/statuses/1208be97041b9282230a00ee11fa0a1ab0b98eb1","head":{"label":"k33g:wip-assertions","ref":"wip-assertions","sha":"1208be97041b9282230a00ee11fa0a1ab0b98eb1","user":{"login":"k33g","id":491848,"avatar_url":"https://avatars.githubusercontent.com/u/491848?v=3","gravatar_id":"","url":"https://api.github.com/users/k33g","html_url":"https://github.com/k33g","followers_url":"https://api.github.com/users/k33g/followers","following_url":"https://api.github.com/users/k33g/following{/other_user}","gists_url":"https://api.github.com/users/k33g/gists{/gist_id}","starred_url":"https://api.github.com/users/k33g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k33g/subscriptions","organizations_url":"https://api.github.com/users/k33g/orgs","repos_url":"https://api.github.com/users/k33g/repos","events_url":"https://api.github.com/users/k33g/events{/privacy}","received_events_url":"https://api.github.com/users/k33g/received_events","type":"User","site_admin":false},"repo":{"id":51304057,"name":"golo-lang","full_name":"k33g/golo-lang","owner":{"login":"k33g","id":491848,"avatar_url":"https://avatars.githubusercontent.com/u/491848?v=3","gravatar_id":"","url":"https://api.github.com/users/k33g","html_url":"https://github.com/k33g","followers_url":"https://api.github.com/users/k33g/followers","following_url":"https://api.github.com/users/k33g/following{/other_user}","gists_url":"https://api.github.com/users/k33g/gists{/gist_id}","starred_url":"https://api.github.com/users/k33g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k33g/subscriptions","organizations_url":"https://api.github.com/users/k33g/orgs","repos_url":"https://api.github.com/users/k33g/repos","events_url":"https://api.github.com/users/k33g/events{/privacy}","received_events_url":"https://api.github.com/users/k33g/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/k33g/golo-lang","description":"Golo - a lightweight dynamic language for the JVM.","fork":true,"url":"https://api.github.com/repos/k33g/golo-lang","forks_url":"https://api.github.com/repos/k33g/golo-lang/forks","keys_url":"https://api.github.com/repos/k33g/golo-lang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/k33g/golo-lang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/k33g/golo-lang/teams","hooks_url":"https://api.github.com/repos/k33g/golo-lang/hooks","issue_events_url":"https://api.github.com/repos/k33g/golo-lang/issues/events{/number}","events_url":"https://api.github.com/repos/k33g/golo-lang/events","assignees_url":"https://api.github.com/repos/k33g/golo-lang/assignees{/user}","branches_url":"https://api.github.com/repos/k33g/golo-lang/branches{/branch}","tags_url":"https://api.github.com/repos/k33g/golo-lang/tags","blobs_url":"https://api.github.com/repos/k33g/golo-lang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/k33g/golo-lang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/k33g/golo-lang/git/refs{/sha}","trees_url":"https://api.github.com/repos/k33g/golo-lang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/k33g/golo-lang/statuses/{sha}","languages_url":"https://api.github.com/repos/k33g/golo-lang/languages","stargazers_url":"https://api.github.com/repos/k33g/golo-lang/stargazers","contributors_url":"https://api.github.com/repos/k33g/golo-lang/contributors","subscribers_url":"https://api.github.com/repos/k33g/golo-lang/subscribers","subscription_url":"https://api.github.com/repos/k33g/golo-lang/subscription","commits_url":"https://api.github.com/repos/k33g/golo-lang/commits{/sha}","git_commits_url":"https://api.github.com/repos/k33g/golo-lang/git/commits{/sha}","comments_url":"https://api.github.com/repos/k33g/golo-lang/comments{/number}","issue_comment_url":"https://api.github.com/repos/k33g/golo-lang/issues/comments{/number}","contents_url":"https://api.github.com/repos/k33g/golo-lang/contents/{+path}","compare_url":"https://api.github.com/repos/k33g/golo-lang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/k33g/golo-lang/merges","archive_url":"https://api.github.com/repos/k33g/golo-lang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/k33g/golo-lang/downloads","issues_url":"https://api.github.com/repos/k33g/golo-lang/issues{/number}","pulls_url":"https://api.github.com/repos/k33g/golo-lang/pulls{/number}","milestones_url":"https://api.github.com/repos/k33g/golo-lang/milestones{/number}","notifications_url":"https://api.github.com/repos/k33g/golo-lang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/k33g/golo-lang/labels{/name}","releases_url":"https://api.github.com/repos/k33g/golo-lang/releases{/id}","deployments_url":"https://api.github.com/repos/k33g/golo-lang/deployments","created_at":"2016-02-08T14:55:10Z","updated_at":"2016-02-08T14:55:12Z","pushed_at":"2016-02-17T12:43:43Z","git_url":"git://github.com/k33g/golo-lang.git","ssh_url":"git@github.com:k33g/golo-lang.git","clone_url":"https://github.com/k33g/golo-lang.git","svn_url":"https://github.com/k33g/golo-lang","homepage":"http://golo-lang.org/","size":4906,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"89ca45d8a3e1d91ce502877e1312ad02edfa9929","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":8340103,"name":"golo-lang","full_name":"eclipse/golo-lang","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars.githubusercontent.com/u/56974?v=3","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/golo-lang","description":"Golo - a lightweight dynamic language for the JVM.","fork":false,"url":"https://api.github.com/repos/eclipse/golo-lang","forks_url":"https://api.github.com/repos/eclipse/golo-lang/forks","keys_url":"https://api.github.com/repos/eclipse/golo-lang/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/golo-lang/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/golo-lang/teams","hooks_url":"https://api.github.com/repos/eclipse/golo-lang/hooks","issue_events_url":"https://api.github.com/repos/eclipse/golo-lang/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/golo-lang/events","assignees_url":"https://api.github.com/repos/eclipse/golo-lang/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/golo-lang/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/golo-lang/tags","blobs_url":"https://api.github.com/repos/eclipse/golo-lang/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/golo-lang/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/golo-lang/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/golo-lang/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/golo-lang/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/golo-lang/languages","stargazers_url":"https://api.github.com/repos/eclipse/golo-lang/stargazers","contributors_url":"https://api.github.com/repos/eclipse/golo-lang/contributors","subscribers_url":"https://api.github.com/repos/eclipse/golo-lang/subscribers","subscription_url":"https://api.github.com/repos/eclipse/golo-lang/subscription","commits_url":"https://api.github.com/repos/eclipse/golo-lang/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/golo-lang/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/golo-lang/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/golo-lang/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/golo-lang/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/golo-lang/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/golo-lang/merges","archive_url":"https://api.github.com/repos/eclipse/golo-lang/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/golo-lang/downloads","issues_url":"https://api.github.com/repos/eclipse/golo-lang/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/golo-lang/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/golo-lang/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/golo-lang/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/golo-lang/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/golo-lang/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/golo-lang/deployments","created_at":"2013-02-21T17:25:34Z","updated_at":"2016-02-17T15:33:16Z","pushed_at":"2016-02-17T22:14:13Z","git_url":"git://github.com/eclipse/golo-lang.git","ssh_url":"git@github.com:eclipse/golo-lang.git","clone_url":"https://github.com/eclipse/golo-lang.git","svn_url":"https://github.com/eclipse/golo-lang","homepage":"http://golo-lang.org/","size":5350,"stargazers_count":135,"watchers_count":135,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":43,"mirror_url":null,"open_issues_count":36,"forks":43,"open_issues":36,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/golo-lang/pulls/360"},"html":{"href":"https://github.com/eclipse/golo-lang/pull/360"},"issue":{"href":"https://api.github.com/repos/eclipse/golo-lang/issues/360"},"comments":{"href":"https://api.github.com/repos/eclipse/golo-lang/issues/360/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/golo-lang/pulls/360/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/golo-lang/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/golo-lang/pulls/360/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/golo-lang/statuses/1208be97041b9282230a00ee11fa0a1ab0b98eb1"}}}}