blob: df92b785ab705ab42db05d52e4547d2e4f8e6f96 [file] [log] [blame] [view]
Alexander Afanasyev2aa39622014-01-22 11:51:11 -08001Requirements
2---------------------
3
4Include the following header into all .hpp and .cpp files:
5
6/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
7/**
8 * Copyright (C) 2014 Named Data Networking Project
9 * See COPYING for copyright and distribution information.
10 */
11
12Recommendations
13---------------
14
15The following code style recommendations are highly advised: https://github.com/cawka/docs-ndn/blob/master/cpp.rst
16
17Running unit-tests
18------------------
19
20To run unit tests, NFD needs to be configured and build with unit test support:
21
22 ./waf configure --with-tests
23 ./waf
24
25The simplest way to run tests, is just to run the compiled binary without any parameters:
26
27 ./build/unit-tests
28
29However, Boost.Test framework is very flexible and allow a number of
30run-time customization of what tests should be run. For example, it
31is possible to choose to run only specific test suite or only a
32specific test case within a suite:
33
34 # Run only skeleton test suite (see tests/test-skeleton.cpp)
35 ./build/unit-tests -t TestSkeleton
36
37 # Run only test cast Test1 from skeleton suite
38 ./build/unit-tests -t TestSkeleton/Test1
39
40By default, Boost.Test framework will produce verbose output only when
41test case fails. If it is desired to see verbose output (result of
42each test assertion), add ``-l all`` option to ``./build/unit-tests``
43command:
44
45 ./build/unit-tests -l all
46
47There are many more command line options available, information about
48which can be obtained either from the command line using ``--help``
49switch, or online on Boost.Test library website (http://www.boost.org/doc/libs/1_55_0/libs/test/doc/html/).