blob: b4cba89999132099b67bd459763e4c1704badb79 [file] [log] [blame] [view]
Alexander Afanasyev2aa39622014-01-22 11:51:11 -08001Requirements
2---------------------
3
Alexander Afanasyev9bcbc7c2014-04-06 19:37:37 -07004Include the following header into all `.hpp` and `.cpp` files:
Alexander Afanasyev2aa39622014-01-22 11:51:11 -08005
Alexander Afanasyev9bcbc7c2014-04-06 19:37:37 -07006 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
7 /**
8 * Copyright (c) 2014 Regents of the University of California,
9 * Arizona Board of Regents,
10 * Colorado State University,
11 * University Pierre & Marie Curie, Sorbonne University,
12 * Washington University in St. Louis,
13 * Beijing Institute of Technology
14 *
15 * This file is part of NFD (Named Data Networking Forwarding Daemon).
16 * See AUTHORS.md for complete list of NFD authors and contributors.
17 *
18 * NFD is free software: you can redistribute it and/or modify it under the terms
19 * of the GNU General Public License as published by the Free Software Foundation,
20 * either version 3 of the License, or (at your option) any later version.
21 *
22 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
23 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
24 * PURPOSE. See the GNU General Public License for more details.
25 *
26 * You should have received a copy of the GNU General Public License along with
27 * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
28 ////// [optional part] //////
29 *
30 * \author Author's Name <email@domain>
31 * \author Other Author's Name <another.email@domain>
32 ////// [end of optional part] //////
33 **/
Alexander Afanasyev2aa39622014-01-22 11:51:11 -080034
35Recommendations
36---------------
37
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070038NFD code is subject to the code style, defined here:
39http://redmine.named-data.net/projects/nfd/wiki/CodeStyle
Alexander Afanasyev2aa39622014-01-22 11:51:11 -080040
41Running unit-tests
42------------------
43
44To run unit tests, NFD needs to be configured and build with unit test support:
45
46 ./waf configure --with-tests
47 ./waf
48
49The simplest way to run tests, is just to run the compiled binary without any parameters:
50
51 ./build/unit-tests
52
53However, Boost.Test framework is very flexible and allow a number of
54run-time customization of what tests should be run. For example, it
55is possible to choose to run only specific test suite or only a
56specific test case within a suite:
57
58 # Run only skeleton test suite (see tests/test-skeleton.cpp)
59 ./build/unit-tests -t TestSkeleton
60
61 # Run only test cast Test1 from skeleton suite
62 ./build/unit-tests -t TestSkeleton/Test1
63
64By default, Boost.Test framework will produce verbose output only when
65test case fails. If it is desired to see verbose output (result of
66each test assertion), add ``-l all`` option to ``./build/unit-tests``
67command:
68
69 ./build/unit-tests -l all
70
71There are many more command line options available, information about
72which can be obtained either from the command line using ``--help``
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070073switch, or online on Boost.Test library website
74(http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/).