Question

Does anyone know of a C++ unit-testing framework (e.g. CppUnit, Google Test, etc.) that can be used to write tests on z/OS?

I do most of my development on Windows using the Dignus C++ compiler, which you can use as a cross-compiler and generate object code to run on z/OS. I tried writing a sample test using Google Test, but the compiler could not compile/link the Google Test code. Google Test does not claim to support z/OS, so this was expected. But, it was worth a try!

Thanks so much for any responses this!

Was it helpful?

Solution

Try CPP Unit Lite (by CppUnit's author). It uses fairly straightforward C++ code, there's a good chance it'll work on z/OS's compiler.

OTHER TIPS

I know I'm late to the party here but for anybody interested in C++ testing frameworks on z/OS I highly recommend the Catch framework which IMO easily surpasses all other C++ testing frameworks I've used. I've been using it on z/OS for about 6 months and it's a breath of fresh air. It's very easy and intuitive to use and has support for Behavior Driven Development (BDD) style tests which is a contemporary way of writing test cases.

It's header only and doesn't rely on any C++11 features which is common pitfall when trying to build modern libraries/frameworks on z/OS as the C++ compiler has limited C++11 support.

The only nit I can think of is compiles take a while because it's a header only library. But nowhere near as long as boost.

Perhaps you could open a bug report for Google Test and see if they fix it? There is probably an ASCII dependency in the code somewhere that caused the test code compile to fail. Could you dig into the error message that the IBM compiler produced?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top