blob: b8bfb62b55bea26b0658d0d1b923e2be2026d180 [file] [log] [blame]
Yingdi Yu3bf91f52015-06-12 19:39:40 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Yingdi Yu6ee2d362015-07-16 21:48:05 -07003 * Copyright (c) 2013-2017 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
Alexander Afanasyev97709c02016-08-25 19:58:30 -070022#include "security/pib/pib-memory.hpp"
Yingdi Yu3bf91f52015-06-12 19:39:40 -070023
24#include "boost-test.hpp"
25
26namespace ndn {
27namespace security {
Yingdi Yu6ee2d362015-07-16 21:48:05 -070028namespace pib {
Yingdi Yu3bf91f52015-06-12 19:39:40 -070029namespace tests {
30
31// most functionalities are tested in pib-impl.t.cpp
Alexander Afanasyev97709c02016-08-25 19:58:30 -070032BOOST_AUTO_TEST_SUITE(Security)
Yingdi Yu6ee2d362015-07-16 21:48:05 -070033BOOST_AUTO_TEST_SUITE(Pib)
Alexander Afanasyev97709c02016-08-25 19:58:30 -070034BOOST_AUTO_TEST_SUITE(TestPibMemory)
Yingdi Yu3bf91f52015-06-12 19:39:40 -070035
36BOOST_AUTO_TEST_CASE(TpmLocatorManagement)
37{
38 PibMemory pibImpl;
39
40 BOOST_CHECK_EQUAL(pibImpl.getTpmLocator(), "tpm-memory:");
41 BOOST_CHECK_THROW(pibImpl.setTpmLocator(""), PibImpl::Error);
42}
43
Davide Pesaventoeee3e822016-11-26 19:19:34 +010044BOOST_AUTO_TEST_SUITE_END() // TestPibMemory
Yingdi Yu6ee2d362015-07-16 21:48:05 -070045BOOST_AUTO_TEST_SUITE_END() // Pib
Davide Pesaventoeee3e822016-11-26 19:19:34 +010046BOOST_AUTO_TEST_SUITE_END() // Security
Yingdi Yu3bf91f52015-06-12 19:39:40 -070047
48} // namespace tests
Yingdi Yu6ee2d362015-07-16 21:48:05 -070049} // namespace pib
Yingdi Yu3bf91f52015-06-12 19:39:40 -070050} // namespace security
51} // namespace ndn