{"action":"created","issue":{"url":"https://api.github.com/repos/perl6/roast/issues/104","repository_url":"https://api.github.com/repos/perl6/roast","labels_url":"https://api.github.com/repos/perl6/roast/issues/104/labels{/name}","comments_url":"https://api.github.com/repos/perl6/roast/issues/104/comments","events_url":"https://api.github.com/repos/perl6/roast/issues/104/events","html_url":"https://github.com/perl6/roast/pull/104","id":133131029,"number":104,"title":"Fix tests that rely on Exception.handled","user":{"login":"b2gills","id":48360,"avatar_url":"https://avatars.githubusercontent.com/u/48360?v=3","gravatar_id":"","url":"https://api.github.com/users/b2gills","html_url":"https://github.com/b2gills","followers_url":"https://api.github.com/users/b2gills/followers","following_url":"https://api.github.com/users/b2gills/following{/other_user}","gists_url":"https://api.github.com/users/b2gills/gists{/gist_id}","starred_url":"https://api.github.com/users/b2gills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b2gills/subscriptions","organizations_url":"https://api.github.com/users/b2gills/orgs","repos_url":"https://api.github.com/users/b2gills/repos","events_url":"https://api.github.com/users/b2gills/events{/privacy}","received_events_url":"https://api.github.com/users/b2gills/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-12T00:56:06Z","updated_at":"2016-02-12T03:32:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/perl6/roast/pulls/104","html_url":"https://github.com/perl6/roast/pull/104","diff_url":"https://github.com/perl6/roast/pull/104.diff","patch_url":"https://github.com/perl6/roast/pull/104.patch"},"body":"Now that you can set `Exception.handled` let's actually test it.\r\n\r\nI changed the test to assign `True` rather than `1` so that in the future it could be implemented with `has bool $.handled is rw;` rather than as a proxied rw method which it is currently.\r\n\r\nWhile looking into this I found two tests that were looking at `$!.pending` even though `$!` should be empty at that point. I think it was just a copy paste error. I changed one to look at `@fails` instead, and removed the other one.\r\n\r\nSince all of the tests I changed were skipped or broken anyway, there should be no problems with maintaining compatibility with v**6.c**.\r\n\r\n---\r\n\r\nActually thinking about it `.handled` might be better if it was called `.is-handled` as someone could think that just calling `.handled` causes it to be handled.\r\n\r\nIt should be safe to do this as the method was never there to begin with."},"comment":{"url":"https://api.github.com/repos/perl6/roast/issues/comments/183166618","html_url":"https://github.com/perl6/roast/pull/104#issuecomment-183166618","issue_url":"https://api.github.com/repos/perl6/roast/issues/104","id":183166618,"user":{"login":"salortiz","id":9382842,"avatar_url":"https://avatars.githubusercontent.com/u/9382842?v=3","gravatar_id":"","url":"https://api.github.com/users/salortiz","html_url":"https://github.com/salortiz","followers_url":"https://api.github.com/users/salortiz/followers","following_url":"https://api.github.com/users/salortiz/following{/other_user}","gists_url":"https://api.github.com/users/salortiz/gists{/gist_id}","starred_url":"https://api.github.com/users/salortiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salortiz/subscriptions","organizations_url":"https://api.github.com/users/salortiz/orgs","repos_url":"https://api.github.com/users/salortiz/repos","events_url":"https://api.github.com/users/salortiz/events{/privacy}","received_events_url":"https://api.github.com/users/salortiz/received_events","type":"User","site_admin":false},"created_at":"2016-02-12T03:32:18Z","updated_at":"2016-02-12T03:32:18Z","body":"\"S04/Exceptions\" talks about `@!` as an unthrown exception list of Failures, so my though was that this S04-exceptions/pending.t tests was, in principle, about them.\r\n\r\nI assumed that if `$! !~~ Exception`, then it should be `Failure`, and `.pending` the planned way to access that list. (Currently `$!` is `Exception` only after a failed `try` block)\r\n\r\nThat way, all tests made sense.\r\n\r\nAbout `.handled,` in S04 it is described as a method of `Mu` only overridden by `Failure` and I start working on it when I found it described in standard documentation, see https://github.com/perl6/doc/blob/master/doc/Type/Failure.pod#L31, try to use it and failed.\r\n\r\nIts evident that S04 and the current implementation are diverging, so I take roast as normative, and this PR removes that way for testing pending Failures. I that isn't desired I haven't drawbacks.\r\n\r\n(`Mu.handled` is trivial, but I don't see its case.)"}}