blob: 74dde3fec98d15b565636f9626f49a0830bde03a [file] [log] [blame]
Yingdi Yu3bf91f52015-06-12 19:39:40 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Davide Pesaventoeee3e822016-11-26 19:19:34 +01003 * Copyright (c) 2013-2016 Regents of the University of California.
Yingdi Yu3bf91f52015-06-12 19:39:40 -07004 *
5 * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
6 *
7 * ndn-cxx library is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License as published by the Free Software
9 * Foundation, either version 3 of the License, or (at your option) any later version.
10 *
11 * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14 *
15 * You should have received copies of the GNU General Public License and GNU Lesser
16 * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17 * <http://www.gnu.org/licenses/>.
18 *
19 * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
20 */
21
22#include "security/pib-memory.hpp"
23
24#include "boost-test.hpp"
25
26namespace ndn {
27namespace security {
28namespace tests {
29
Davide Pesaventoeee3e822016-11-26 19:19:34 +010030BOOST_AUTO_TEST_SUITE(Security)
31BOOST_AUTO_TEST_SUITE(TestPibMemory)
32
Yingdi Yu3bf91f52015-06-12 19:39:40 -070033// most functionalities are tested in pib-impl.t.cpp
Yingdi Yu3bf91f52015-06-12 19:39:40 -070034
35BOOST_AUTO_TEST_CASE(TpmLocatorManagement)
36{
37 PibMemory pibImpl;
38
39 BOOST_CHECK_EQUAL(pibImpl.getTpmLocator(), "tpm-memory:");
40 BOOST_CHECK_THROW(pibImpl.setTpmLocator(""), PibImpl::Error);
41}
42
Davide Pesaventoeee3e822016-11-26 19:19:34 +010043BOOST_AUTO_TEST_SUITE_END() // TestPibMemory
44BOOST_AUTO_TEST_SUITE_END() // Security
Yingdi Yu3bf91f52015-06-12 19:39:40 -070045
46} // namespace tests
47} // namespace security
48} // namespace ndn