{"action":"created","issue":{"url":"https://api.github.com/repos/miloyip/json-tutorial/issues/25","repository_url":"https://api.github.com/repos/miloyip/json-tutorial","labels_url":"https://api.github.com/repos/miloyip/json-tutorial/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/miloyip/json-tutorial/issues/25/comments","events_url":"https://api.github.com/repos/miloyip/json-tutorial/issues/25/events","html_url":"https://github.com/miloyip/json-tutorial/issues/25","id":178630066,"number":25,"title":"EXPECT_FALSE()宏有问题！","user":{"login":"fanjinhua","id":11046130,"avatar_url":"https://avatars.githubusercontent.com/u/11046130?v=3","gravatar_id":"","url":"https://api.github.com/users/fanjinhua","html_url":"https://github.com/fanjinhua","followers_url":"https://api.github.com/users/fanjinhua/followers","following_url":"https://api.github.com/users/fanjinhua/following{/other_user}","gists_url":"https://api.github.com/users/fanjinhua/gists{/gist_id}","starred_url":"https://api.github.com/users/fanjinhua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanjinhua/subscriptions","organizations_url":"https://api.github.com/users/fanjinhua/orgs","repos_url":"https://api.github.com/users/fanjinhua/repos","events_url":"https://api.github.com/users/fanjinhua/events{/privacy}","received_events_url":"https://api.github.com/users/fanjinhua/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-22T14:44:37Z","updated_at":"2016-09-22T15:23:32Z","closed_at":null,"body":"这样传参的话：EXPECT_FALSE(lept_get_boolean(&v))\r\nlept_get_boolean() 正常情况下返回 LEPT_FALSE（1）\r\n而宏展开则是 (actual) == 0，\r\n应该是 (actual) == 1 才符合测试。"},"comment":{"url":"https://api.github.com/repos/miloyip/json-tutorial/issues/comments/248936296","html_url":"https://github.com/miloyip/json-tutorial/issues/25#issuecomment-248936296","issue_url":"https://api.github.com/repos/miloyip/json-tutorial/issues/25","id":248936296,"user":{"login":"chanchancl","id":11457297,"avatar_url":"https://avatars.githubusercontent.com/u/11457297?v=3","gravatar_id":"","url":"https://api.github.com/users/chanchancl","html_url":"https://github.com/chanchancl","followers_url":"https://api.github.com/users/chanchancl/followers","following_url":"https://api.github.com/users/chanchancl/following{/other_user}","gists_url":"https://api.github.com/users/chanchancl/gists{/gist_id}","starred_url":"https://api.github.com/users/chanchancl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chanchancl/subscriptions","organizations_url":"https://api.github.com/users/chanchancl/orgs","repos_url":"https://api.github.com/users/chanchancl/repos","events_url":"https://api.github.com/users/chanchancl/events{/privacy}","received_events_url":"https://api.github.com/users/chanchancl/received_events","type":"User","site_admin":false},"created_at":"2016-09-22T15:23:32Z","updated_at":"2016-09-22T15:23:32Z","body":"你好，我觉得你可能对lept_get_boolean()返回值有点误解，\r\nlept_get_boolean()返回的应该是，v所代表的布尔值对应的 0或1\r\n而不是 LEPT_FALSE 或者 LEPT_TRUE\r\n具体我是这样实现的，这样EXPECT_FALSE没问题\r\nint lept_get_boolean(const lept_value* v) {\r\n    /* \\TODO */\r\n\tassert(v->type == LEPT_TRUE || v->type == LEPT_FALSE);\r\n    return v->type == LEPT_TRUE ? 1 : 0;\r\n}"}}
{"actor":{"display_login":"chanchancl"}}