{"action":"created","issue":{"url":"https://api.github.com/repos/cpputest/cpputest/issues/847","labels_url":"https://api.github.com/repos/cpputest/cpputest/issues/847/labels{/name}","comments_url":"https://api.github.com/repos/cpputest/cpputest/issues/847/comments","events_url":"https://api.github.com/repos/cpputest/cpputest/issues/847/events","html_url":"https://github.com/cpputest/cpputest/pull/847","id":129324970,"number":847,"title":"Add mock support for bool and long long.","user":{"login":"uecasm","id":539951,"avatar_url":"https://avatars.githubusercontent.com/u/539951?v=3","gravatar_id":"","url":"https://api.github.com/users/uecasm","html_url":"https://github.com/uecasm","followers_url":"https://api.github.com/users/uecasm/followers","following_url":"https://api.github.com/users/uecasm/following{/other_user}","gists_url":"https://api.github.com/users/uecasm/gists{/gist_id}","starred_url":"https://api.github.com/users/uecasm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uecasm/subscriptions","organizations_url":"https://api.github.com/users/uecasm/orgs","repos_url":"https://api.github.com/users/uecasm/repos","events_url":"https://api.github.com/users/uecasm/events{/privacy}","received_events_url":"https://api.github.com/users/uecasm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-28T03:46:39Z","updated_at":"2016-02-02T00:49:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cpputest/cpputest/pulls/847","html_url":"https://github.com/cpputest/cpputest/pull/847","diff_url":"https://github.com/cpputest/cpputest/pull/847.diff","patch_url":"https://github.com/cpputest/cpputest/pull/847.patch"},"body":"This adds `bool` and `long long`/`unsigned long long` support to CppUMock.  (Including tests.)\r\n\r\n`bool` is supported unconditionally on the C++ side and conditionally on the C side (included by default for C11 or where configure detects stdbool.h; excluded by default otherwise).  The user can define macros in the project or when running configure to force this on or off as desired.\r\n\r\n`[unsigned] long long` is supported for MSVC or for C++11 or if configure thinks the compiler is fine with it.  For the latter case, `-Wno-long-long` is added to prevent warning spam if pre-C++11.  Again, the user can define macros in the project or at configure time to force this on or off as desired.\r\n\r\nTested on 32-bit MSVC 2013 and 64-bit GCC (both default and C++11).  I've tried to make the detection robust for other cases but I welcome any improvements.\r\n\r\nCurrently it considers `bool` and `int` to be incompatible types (except in the special case that C++ can set a `bool` and non-`bool`-supporting C can fetch it as an `int`).  Also the APIs disappear entirely if not enabled, rather than defining some fallback, so you'll get compile-time errors if your tests expect long-long support but don't enable it.  I'm open to changing these (or other things) if alternatives are preferred, or splitting this to separate PRs for bool and longlong."},"comment":{"url":"https://api.github.com/repos/cpputest/cpputest/issues/comments/178280392","html_url":"https://github.com/cpputest/cpputest/pull/847#issuecomment-178280392","issue_url":"https://api.github.com/repos/cpputest/cpputest/issues/847","id":178280392,"user":{"login":"basvodde","id":509919,"avatar_url":"https://avatars.githubusercontent.com/u/509919?v=3","gravatar_id":"","url":"https://api.github.com/users/basvodde","html_url":"https://github.com/basvodde","followers_url":"https://api.github.com/users/basvodde/followers","following_url":"https://api.github.com/users/basvodde/following{/other_user}","gists_url":"https://api.github.com/users/basvodde/gists{/gist_id}","starred_url":"https://api.github.com/users/basvodde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basvodde/subscriptions","organizations_url":"https://api.github.com/users/basvodde/orgs","repos_url":"https://api.github.com/users/basvodde/repos","events_url":"https://api.github.com/users/basvodde/events{/privacy}","received_events_url":"https://api.github.com/users/basvodde/received_events","type":"User","site_admin":false},"created_at":"2016-02-02T00:49:00Z","updated_at":"2016-02-02T00:49:00Z","body":"I'm a bit uncomfortable with all the LONG LONG #defines in the mocking interface. But, I can't think of a better alternative."}}