views:

61

answers:

3

Does anyone know where I can find unit tests that will test std::map?

The reason I ask is because I have written a class that acts as a replacment for std::map and has virtually all the same functionality, so unit tests for std::map will be suitable for my class, too.

Of course, I can write my own, but if someone has already written extensive tests for this then that would save me a lot of time and would hopefully cover things that I might have missed.

Thanks.

+3  A: 

While i don't know how much is needed to use them stand-alone, you could take a look at libstdc++' testsuite.

Georg Fritzsche
+3  A: 

Try to find it in open source library implementations like:

libstdc++ libc++

Ricardo Muñoz
+2  A: 

The book The C++ Standard Template Library by Plauger et al provides code for a sample STL implementation, with test code for all types. I don't know from memory if the code is available on-line though.

anon