Skip to main content
added 289 characters in body
Source Link
aufather
  • 4.4k
  • 2
  • 29
  • 24

There must be a point when one should stop trying to unit test. Should know when to draw the line. Should we write test cases to test test cases? What about the new test cases written to test test cases? How will we test them?

if (0 > printf("Hello, world\n")) {
  printf("Printing \"Hello, world\" failed\n");
}

Edit: Updated with explanation as suggested by comment.

if (0 > printf("Hello, world\n")) {
  printf("Printing \"Hello, world\" failed\n");
}

There must be a point when one should stop trying to unit test. Should know when to draw the line. Should we write test cases to test test cases? What about the new test cases written to test test cases? How will we test them?

if (0 > printf("Hello, world\n")) {
  printf("Printing \"Hello, world\" failed\n");
}

Edit: Updated with explanation as suggested by comment.

Source Link
aufather
  • 4.4k
  • 2
  • 29
  • 24

if (0 > printf("Hello, world\n")) {
  printf("Printing \"Hello, world\" failed\n");
}