blob: bf9771e5e3a13fbc2c44be5d6f491a388e403e1e [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
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070015NFD code is subject to the code style, defined here:
16http://redmine.named-data.net/projects/nfd/wiki/CodeStyle
Alexander Afanasyev2aa39622014-01-22 11:51:11 -080017
18Running unit-tests
19------------------
20
21To run unit tests, NFD needs to be configured and build with unit test support:
22
23 ./waf configure --with-tests
24 ./waf
25
26The simplest way to run tests, is just to run the compiled binary without any parameters:
27
28 ./build/unit-tests
29
30However, Boost.Test framework is very flexible and allow a number of
31run-time customization of what tests should be run. For example, it
32is possible to choose to run only specific test suite or only a
33specific test case within a suite:
34
35 # Run only skeleton test suite (see tests/test-skeleton.cpp)
36 ./build/unit-tests -t TestSkeleton
37
38 # Run only test cast Test1 from skeleton suite
39 ./build/unit-tests -t TestSkeleton/Test1
40
41By default, Boost.Test framework will produce verbose output only when
42test case fails. If it is desired to see verbose output (result of
43each test assertion), add ``-l all`` option to ``./build/unit-tests``
44command:
45
46 ./build/unit-tests -l all
47
48There are many more command line options available, information about
49which can be obtained either from the command line using ``--help``
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070050switch, or online on Boost.Test library website
51(http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/).