Re: [eigen] Bug in traspose

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


> Any thoughts on which testing framework you want to switch to?
> I've used CxxTest before and liked it...

I really like CxxTest too - I'm using it for one of my own projects (which, 
incidentally, uses Eigen), and it's been great.  I was a bit leery initially 
of the dependency on either Perl or Python (your choice - a script in each 
language is provided that generates test source files from a C++ header you 
write), but it's quite easy to integrate into CMake (and in my case I have a 
dependency on Python anyways, so it didn't really matter).  If it helps, 
here's pretty much what I use to generate test executables:

FIND_PACKAGE(PythonInterp REQUIRED)

# Generate test source file
ADD_CUSTOM_COMMAND(
    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${test_name}.cpp
    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${test_name}.hpp
    COMMAND ${PYTHON_EXECUTABLE}
    ARGS
        ${PATH_TO_CXXTEST}/cxxtestgen.py
        --error-printer
        -o ${CMAKE_CURRENT_BINARY_DIR}/${test_name}.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/${test_name}.hpp)
    
# Create and link test executable
ADD_EXECUTABLE(
	${test_name}
       ${CMAKE_CURRENT_BINARY_DIR}/${test_name}.cpp)

This can be put inside a loop where the test_name variable takes on several 
values.  In my case, I have a copy of CxxTest in my own project directory, so 
instead of ${PATH_TO_CXXTEST} I have a path relative to my project directory.

-Ian




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/