burner/sweet.hpp — pull request #3 by powertomato (2013-09-18 22:24:52+00:00)
Title: Fixed a warning in UNITTEST macro

This is a work-around which fixes the standard violation I described in issue https://github.com/burner/sweet.hpp/issues/2. It follows the following pattern:

http://stackoverflow.com/questions/5355241/generating-function-declaration-using-a-macro-iteration/5355946#5355946

In its current form it generates correct code for 1-3 arguments. If you like to add more arguments to the ```Unit::Unittest```-Constructor this will not be sufficient and the following lines has to be changed:

```
#define PP_HAS_ARGS_IMPL2(_1, _2, _3, N, ...) N
#define PP_HAS_ARGS_SOURCE() MULTI, MULTI, ONE, ERROR
```

i.e. add an argument to ```PP_HAS_ARGS_IMPL2``` and a ```MULTI,``` to ```PP_HAS_ARGS_SOURCE```

e.g. 4 arguments would be:
```
#define PP_HAS_ARGS_IMPL2(_1, _2, _3, _4, N, ...) N
#define PP_HAS_ARGS_SOURCE() MULTI, MULTI, MULTI, ONE, ERROR
```

I know it looks scary but until ```##__VA_ARGS__``` gets standardized it is the only warning-free option