Skip to content

Long and short macros #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 17, 2016
Merged

Long and short macros #114

merged 4 commits into from
Aug 17, 2016

Conversation

pjohnmeyer
Copy link
Member

This PR accomplishes 2 things:

  1. Gives users the ability to disable the "short" interface macros such as CHECK and TEST, which have a tendency to collide with other things, by defining UNITTEST_DISABLE_SHORT_MACROS in their project.
  2. Normalizes project macros to be prefixed UNITTEST_ if they are part of the public interface, and UNITTEST_IMPL_ if they are not.

See #64 for motivation.

pjohnmeyer added 4 commits May 6, 2016 23:44
UNITTEST_ now prefixes the implementation of all CHECK macros.
Additionally, the build option UNITTEST_ENABLE_SHORT_MACROS can be
shut off, disabling the creation of the existing short forms. This is
helpful for users who may have conflicts with their projects or other
libs.
The UT_ prefix was primarily for "internal" macros. This commit seeks
to more consistently "namespace" UnitTest++ macros with the UNITTEST_
prefix, while also marking these particular macros as "private"
implementation details with the IMPL_ wart.
TEST, SUITE, and REQUIRE macros now have UNITTEST_ and UNITTEST_IMPL_
prefixes like the others, completing the set.
@pjohnmeyer pjohnmeyer added this to the 1.6.2 milestone May 7, 2016
@pjohnmeyer pjohnmeyer merged commit 097c71e into master Aug 17, 2016
@pjohnmeyer pjohnmeyer deleted the long_and_short_macros branch January 13, 2017 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant