10.07.2015 Views

White Box Testing

White Box Testing

White Box Testing

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

const int CHUNK_SIZE = 100;Internal Boundary <strong>Testing</strong>char * ReadLine(istream & is) {int c = is.get();if (c == -1) {return 0;}char * buf = new char[CHUNK_SIZE];int bufSize = CHUNK_SIZE;int strSize = 0;while (c != '\n' && c != -1) {if (strSize == bufSize - 1) {buf = Grow(buf, bufSize);bufSize += CHUNK_SIZE;}buf[strSize++] = (char)c;What test cases do we need?Lines of length 99, 100, 101}c = is.get();buf[strSize] = '\0';}return buf;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!