Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!pilchuck!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.lang.c++ Subject: Re: Test Suites C++ wanted Message-ID: <2410@dataio.Data-IO.COM> Date: 28 Mar 90 19:29:39 GMT References: <57289@oliveb.olivetti.com> <691@halley.UUCP> Reply-To: bright@Data-IO.COM (Walter Bright) Organization: Data I/O Corporation; Redmond, WA Lines: 21 I'd be wary of most compiler test suites. Nearly all that I've looked at only tested parsing and semantic analysis. Practically *none* tested things like optimization, aliasing assumptions, code generation, floating point accuracy, etc. Another problem I tend to see are tests that only are meant to be compiled. The tests are not complete enough to actually run. The following compiler program will 'pass' the test: int main() { return 0; } Things to look for in a test suite are constructs like: testadd() { int i1,i2; assert(sizeof(i1) == 2); /* for 16 bit ints */ i1 = 1; i2 = 2; assert(i1 + i2 == 3); assert(i1 - i2 == -1); ... }