tree: e6ffe4b75374c8ced267141e9c07d28f34b3f82d [path history] [tgz]
  1. chunks/
  2. dissect-wireshark/
  3. dump/
  4. peek/
  5. ping/
  6. boost-test.hpp
  7. clock-fixture.cpp
  8. clock-fixture.hpp
  9. io-fixture.hpp
  10. key-chain-fixture.hpp
  11. main.cpp
  12. README.md
  13. test-case.t.cpp.sample
  14. test-common.cpp
  15. test-common.hpp
  16. wscript
tests/README.md

ndn-tools unit tests

Assumptions

Unit tests for a tool foo should be placed in the folder foo and the build script for the tool should define foo-objects that includes all object files for that tool, except the object that contains the main() function.

For example:

def build(bld):
    bld.objects(
        target='tool-subtool-objects',
        source=bld.path.ant_glob('subtool/*.cpp', excl='subtool/main.cpp'),
        use='core-objects')

    bld.program(
        name='subtool',
        target='../../bin/subtool',
        source='subtool/main.cpp',
        use='tool-subtool-objects')

    bld(name='tool-objects',
        use='tool-subtool-objects')