Created
December 17, 2013 13:08
-
-
Save pdcgomes/8004622 to your computer and use it in GitHub Desktop.
You can use this to declare unit testing methods, they will be named: "test{index}_methodName" where {index} is automatically incremented whenever the macro is expanded.
This ensures that unit tests run in the order they've been specified. WARNING: this will not work if you include the file in a precompiled header prefix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You can use this to declare unit testing methods, they will be named: | |
// test{index}_methodName where {index} is automatically incremented whenever the macro is expanded | |
// this ensures that unit tests run in the order they've been specified | |
// WARNING: this will not work if you include the file in a precompiled header prefix | |
#define CONCAT_INNER(a, b) test##a##_##b | |
#define CONCAT(a, b) CONCAT_INNER(a, b) | |
#define DECLARE_TEST_METHOD(_testName_) CONCAT(__COUNTER__, _testName_) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment