1234567891011121314151617181920212223242526272829303132 |
- #include <iostream>
- #include "ra/tuples.hh"
- using std::cout, std::endl;
- int main()
- {
- int errors = 0;
- int a = 0;
- #define ADDTHIS(x) a += x;
- FOR_EACH(ADDTHIS, 1, 2, 3);
- errors += (6!=a);
- a = 0;
- FOR_EACH(ADDTHIS, 7, 0);
- errors += (7!=a);
- a = 0;
- FOR_EACH(ADDTHIS, 3);
- errors += (3!=a);
- #undef ADDTHIS
- std::cout << errors << " errors" << endl;
- return errors;
- }
|