From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2002-05-27T05:59:35+09:00 Subject: using test::unit for C++ unit tests I'm going to be starting on a C++ development project for a contract I'm doing and I'd like to use the 'test-first' philosophy and develop unit tests first. Has anyone adapted any of Ruby's unit testing frameworks to do unit testing for C++ classes? I'm thinking that there could be a couple of approaches: 1) make the C++ libraries Ruby extensions and instaniate the C++ objects and pass messages to them on the Ruby side. 2) make some kind of wrapper class (in C++) that gets used to instantiate and call methods and then returns some error code. Compile this wrapper into an executable binary that gets called from Ruby with error codes being passed back: errors = 'exercise ' 3) a variation on #2 that uses expect.rb. While #1 seems perhaps to be the cleanest choice, we don't have much time to set all of this up, so creating the extensions might take longer than what we'd like. Can anyone who has done this offer some pointers? Phil