blob: d9cae4af3440853132863e13c666d1db82446384 [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,
Alexander Afanasyev3ecec502014-04-16 13:42:44 -070013 * Beijing Institute of Technology,
14 * The University of Memphis
Alexander Afanasyev9bcbc7c2014-04-06 19:37:37 -070015 *
16 * This file is part of NFD (Named Data Networking Forwarding Daemon).
17 * See AUTHORS.md for complete list of NFD authors and contributors.
18 *
19 * NFD is free software: you can redistribute it and/or modify it under the terms
20 * of the GNU General Public License as published by the Free Software Foundation,
21 * either version 3 of the License, or (at your option) any later version.
22 *
23 * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
24 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
25 * PURPOSE. See the GNU General Public License for more details.
26 *
27 * You should have received a copy of the GNU General Public License along with
28 * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
29 ////// [optional part] //////
30 *
31 * \author Author's Name <email@domain>
32 * \author Other Author's Name <another.email@domain>
33 ////// [end of optional part] //////
34 **/
Alexander Afanasyev2aa39622014-01-22 11:51:11 -080035
36Recommendations
37---------------
38
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070039NFD code is subject to the code style, defined here:
40http://redmine.named-data.net/projects/nfd/wiki/CodeStyle
Alexander Afanasyev2aa39622014-01-22 11:51:11 -080041
42Running unit-tests
43------------------
44
45To run unit tests, NFD needs to be configured and build with unit test support:
46
47 ./waf configure --with-tests
48 ./waf
49
50The simplest way to run tests, is just to run the compiled binary without any parameters:
51
52 ./build/unit-tests
53
54However, Boost.Test framework is very flexible and allow a number of
55run-time customization of what tests should be run. For example, it
56is possible to choose to run only specific test suite or only a
57specific test case within a suite:
58
59 # Run only skeleton test suite (see tests/test-skeleton.cpp)
60 ./build/unit-tests -t TestSkeleton
61
62 # Run only test cast Test1 from skeleton suite
63 ./build/unit-tests -t TestSkeleton/Test1
64
65By default, Boost.Test framework will produce verbose output only when
66test case fails. If it is desired to see verbose output (result of
67each test assertion), add ``-l all`` option to ``./build/unit-tests``
68command:
69
70 ./build/unit-tests -l all
71
72There are many more command line options available, information about
73which can be obtained either from the command line using ``--help``
Alexander Afanasyeveb3197f2014-03-17 19:28:18 -070074switch, or online on Boost.Test library website
75(http://www.boost.org/doc/libs/1_48_0/libs/test/doc/html/).