Here's the "makefile" for an example unit test:
# -*- python -*-
# test/unit/example
Import( 'testEnv' )
testEnv.UnitTest( 'example', ['factorial.cpp', 'fixture.cpp'] )
testEnv.UnitTest( 'example2.py' )
This is sufficient to compile the C program, and run both unit tests. If there was an install step, it wouldn't require any additional code in
(
Read more... )
Comments 3
More substantively [because everyone around here is half-a$$ed] does fixture.cpp contain the unit tests for factorial.cpp? Where are the tests for example2.py spec'ed?
Reply
example is a unit test program with two files: factorial.cpp and fixture.cpp. (I didn't link in a library with an external implementation, but a non-example case would. In this case both are unit test code, factorial.cpp just happens to have the factorial implementation as well)
example2.py is a separate unit test.
Reply
Ooohh! Ahhh! I'm reading the SCons wiki now. Nice.
Reply
Leave a comment