fork(1) download
  1. #include <stdio.h>
  2. #define ASSERT_VALUES(condition, printsyntax, ...) \
  3.   if(!(condition)) \
  4.   printf("condition %s not met! (" printsyntax ")\n", #condition, __VA_ARGS__);
  5.  
  6. int main(int argc, int argv)
  7. {
  8. int *i = NULL;
  9. int j = 11;
  10. ASSERT_VALUES((i!=NULL) && (j>10), "i=%p, j=%d", i, j)
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
condition (i!=NULL) && (j>10) not met! (i=(nil), j=11)