{"action":"closed","issue":{"url":"https://api.github.com/repos/cpputest/cpputest/issues/1000","repository_url":"https://api.github.com/repos/cpputest/cpputest","labels_url":"https://api.github.com/repos/cpputest/cpputest/issues/1000/labels{/name}","comments_url":"https://api.github.com/repos/cpputest/cpputest/issues/1000/comments","events_url":"https://api.github.com/repos/cpputest/cpputest/issues/1000/events","html_url":"https://github.com/cpputest/cpputest/issues/1000","id":160125061,"number":1000,"title":"CHECK_-Macros must be used with care","user":{"login":"everclear72216","id":2970804,"avatar_url":"https://avatars.githubusercontent.com/u/2970804?v=3","gravatar_id":"","url":"https://api.github.com/users/everclear72216","html_url":"https://github.com/everclear72216","followers_url":"https://api.github.com/users/everclear72216/followers","following_url":"https://api.github.com/users/everclear72216/following{/other_user}","gists_url":"https://api.github.com/users/everclear72216/gists{/gist_id}","starred_url":"https://api.github.com/users/everclear72216/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/everclear72216/subscriptions","organizations_url":"https://api.github.com/users/everclear72216/orgs","repos_url":"https://api.github.com/users/everclear72216/repos","events_url":"https://api.github.com/users/everclear72216/events{/privacy}","received_events_url":"https://api.github.com/users/everclear72216/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-14T08:31:34Z","updated_at":"2016-06-19T08:10:22Z","closed_at":"2016-06-19T08:10:22Z","body":"I'm new to using CppUTest and so far I think it is the best testing framework for embedded. However, I came across a little problem that of course was my fault. I wrote a lot of tests that have CHECK statements like this one.\r\n\r\nCHECK_EQUAL(60, ParamMgrGetParamByIndex(kTestParameter1Index, kSECLVL_PIN_X));\r\n\r\nI have been using this for very simple functions so far. Now I needed the function above to call a mock whose return value would change the behavior and thus the return value of my CuT. My test kept failing due to (2nd) calls to my mock. I did not know where these additional calls were coming from until I looked at CHECK_EQUAL_LOCATION's definition. The macro parameter \"actual\" is used up to two times.\r\n\r\nIsn't there a way to make the macro an actual function, so my syntax above does not lead to this unexpected behavior?"}}
{"actor":{"display_login":"everclear72216"}}