Exception Handling Test Suite for STLport
by Dave Abrahams, Boris Fomitchev Synopsiseh_test [-n <iterations>] [-s <size>] [-l] [-e] [-q]/[-v] [-t] Options:
The StoryThe testsuite was written by Dave Abrahams for testing of proposed EH for SGI STL . Shortly, EH was merged into STLport v1.0. That wasn't long until EH was introduced in SGI STL distribution, too (a bit different approach was used). This test helped to locate and fix some EH bugs in 2.0-2.02 releases of SGI STL. As a side effect, it reveals problems in some compiler's EH implementation (typically they show up when you are trying turning on some optimizations). PortabilityEH testsuite can be compiled and run with the following compilers :
Makefiles for gcc, SUNPro, Visual C++ compilers are provided with the suite. Look for .mak files in the distribution. It should be not difficult to adjust one of them to your compiler. How ToEH testsuite comes in directory test/eh with your STLport distribution. Edit appropriate makefile to fit your compiler and include directories . After you've done, try "make check". That should build test executable and run it with default options (see Synopsis). If writing your own makefile or working from within some IDE, you should specify the following switches to get proper testing : _STLP_USE_NEWALLOC - use new-based allocator (that will promptly throw on common test scheme). Otherwise, only assignment/comparison will throw, _STLP_USE_DEBUG_ALLOC - to catch other potential memory problems. EH_NEW_HEADERS - if you wish to use new-style C++ headers. This option may be useful to test some other STL implementation. For Borland C++ 5.x , you have to #define _STLP_NO_NAMESPACES to compile. For 16-bit platforms, you have to #define NO_FAST_ALLOCATOR to compile. The testsuite may be used to test not only STLport adaptation against particular compiler. It does not contain any adaptation-specific code, so it may be used with regular SGI release (note _STLP_USE_NEWALLOC has no effect then) or with other STL implementation (hash containers and rope may not work). CopyrightThis software is Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Mark of the Unicorn makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. | |
Table of Contents | |
Copyright 2001 by STLport |