tree: 3469052dbe468db9ab03285bf688c240b6e18dfc [path history] [tgz]
  1. chunks/
  2. dissect-wireshark/
  3. dump/
  4. get/
  5. peek/
  6. ping/
  7. boost-test.hpp
  8. clock-fixture.cpp
  9. clock-fixture.hpp
  10. io-fixture.hpp
  11. key-chain-fixture.hpp
  12. main.cpp
  13. README.md
  14. test-case.t.cpp.sample
  15. test-common.cpp
  16. test-common.hpp
  17. 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')