{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/test/issues/205","labels_url":"https://api.github.com/repos/dart-lang/test/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/test/issues/205/comments","events_url":"https://api.github.com/repos/dart-lang/test/issues/205/events","html_url":"https://github.com/dart-lang/test/issues/205","id":85655031,"number":205,"title":"unittest test case messages are mangled when type mismatch.","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/test/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/dart-lang/test/labels/Community-StarterBug","name":"Community-StarterBug","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/test/labels/NotPlanned","name":"NotPlanned","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/test/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-05T23:18:52Z","updated_at":"2015-06-05T23:18:54Z","closed_at":"2015-06-05T23:18:54Z","body":"<a href=\"https://github.com/butlermatt\"><img src=\"https://avatars.githubusercontent.com/u/1148886?v=3\" align=\"left\" width=\"96\" height=\"96\"hspace=\"10\"></img></a> **Issue by [butlermatt](https://github.com/butlermatt)**\n_Originally opened as dart-lang/sdk#9906_\n\n----\n\nThe following tests:\n\nimport 'package:unittest/unittest.dart';\n\nmain() {\n&nbsp;&nbsp;test('Failing message', () {\n&nbsp;&nbsp;&nbsp;&nbsp;expect('error', equals(5.0));\n&nbsp;&nbsp;});\n}\n\nThe Testcase message shows:\nFAIL: Failing message\n&nbsp;&nbsp;Expected: &lt;5.0&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but: expected double:&lt;5.0&gt; but was String:'error'.\n\nIf however I'm checking against the same type:\nexpect('error', equals('opps'));\n\nThen the error message is not mangled:\nFAIL: Failing message\n&nbsp;&nbsp;Expected: 'opps'\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but: was 'error'.\n\nIt appears to be the case for any type mismatches that the 'but' clause is mangled. \nexpect('error', false);\n\nFAIL: Failing message\n&nbsp;&nbsp;Expected: &lt;false&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but: expected bool:&lt;false&gt; but was String:'error'.\n\nWould expect the message to simply be:\n\nFAIL: Failing message\n&nbsp;&nbsp;Expected: &lt;false&gt;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;but: was String:'error'."},"comment":{"url":"https://api.github.com/repos/dart-lang/test/issues/comments/109479068","html_url":"https://github.com/dart-lang/test/issues/205#issuecomment-109479068","issue_url":"https://api.github.com/repos/dart-lang/test/issues/205","id":109479068,"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-05T23:18:53Z","updated_at":"2015-06-05T23:18:53Z","body":"<a href=\"https://github.com/kevmoo\"><img src=\"https://avatars.githubusercontent.com/u/17034?v=3\" align=\"left\" width=\"48\" height=\"48\"hspace=\"10\"></img></a> **Comment by [kevmoo](https://github.com/kevmoo)**\n\n----\n\n*Removed [Area-UnitTest](../labels/Area-UnitTest) label.*\n*Added [Area-Pkg](../labels/Area-Pkg) label.*\n"}}