blob: 9d2c3f8bb709f2e6dd4c31b880be4a9fe0a1c39f [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
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 {
28namespace tests {
29
30// most functionalities are tested in pib-impl.t.cpp
Alexander Afanasyev97709c02016-08-25 19:58:30 -070031BOOST_AUTO_TEST_SUITE(Security)
32BOOST_AUTO_TEST_SUITE(TestPib)
33BOOST_AUTO_TEST_SUITE(TestPibMemory)
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
Alexander Afanasyev97709c02016-08-25 19:58:30 -070044BOOST_AUTO_TEST_SUITE_END() // TestPib
Davide Pesaventoeee3e822016-11-26 19:19:34 +010045BOOST_AUTO_TEST_SUITE_END() // Security
Yingdi Yu3bf91f52015-06-12 19:39:40 -070046
47} // namespace tests
48} // namespace security
49} // namespace ndn