{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/matcher/issues/23","labels_url":"https://api.github.com/repos/dart-lang/matcher/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/matcher/issues/23/comments","events_url":"https://api.github.com/repos/dart-lang/matcher/issues/23/events","html_url":"https://github.com/dart-lang/matcher/issues/23","id":85652182,"number":23,"title":"pkg/matcher: isEmpty should fail for null or non-collections.","user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/matcher/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/dart-lang/matcher/labels/Community-Idea","name":"Community-Idea","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/matcher/labels/Community-StarterBug","name":"Community-StarterBug","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/matcher/labels/Fixed","name":"Fixed","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-05T22:59:48Z","updated_at":"2015-06-05T22:59:48Z","closed_at":null,"body":"_Originally opened as dart-lang/sdk#21562_\n\n*This issue was originally filed by bl...&#064;google.com*\n_____\nAs there is no isNotEmpty matcher, you are forced to use isNot(isEmpty). However, expect(null, isNot(isEmpty)) passes because isEmpty returns false for non-collections or null. So, likewise, any other non-collection object would also wrongly pass such an expect call.\n\nMy suggested solution would be for isEmpty to throw an exception for &quot;wrong&quot; types.\n\nAlternatively, an isNotEmpty matcher could be added.\n\nThanks,\n&nbsp;Andreas "},"comment":{"url":"https://api.github.com/repos/dart-lang/matcher/issues/comments/109472263","html_url":"https://github.com/dart-lang/matcher/issues/23#issuecomment-109472263","issue_url":"https://api.github.com/repos/dart-lang/matcher/issues/23","id":109472263,"user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T22:59:48Z","updated_at":"2015-06-05T22:59:48Z","body":"<a href=\"https://github.com/lrhn\"><img src=\"https://avatars.githubusercontent.com/u/4865287?v=3\" align=\"left\" width=\"48\" height=\"48\"hspace=\"10\"></img></a> **Comment by [lrhn](https://github.com/lrhn)**\n\n----\n\n*Removed [Type-Defect](../labels/Type-Defect) label.*\n*Added [Type-Enhancement](../labels/Type-Enhancement), [Area-Pkg](../labels/Area-Pkg), [Pkg-Unittest](../labels/Pkg-Unittest), [Triaged](../labels/Triaged) labels.*\n"}}