OpenVPN 3 Core Library
Loading...
Searching...
No Matches
test_log.cpp
Go to the documentation of this file.
1
// OpenVPN -- An application to securely tunnel IP networks
2
// over a single port, with support for SSL/TLS-based
3
// session authentication and key exchange,
4
// packet encryption, packet authentication, and
5
// packet compression.
6
//
7
// Copyright (C) 2012- OpenVPN Inc.
8
//
9
// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10
//
11
12
#include "
test_common.hpp
"
13
14
15
// The ovpncli.cpp file is not all OPENVPN_EXTERN safe and totally breaks
16
// if included in two files. We probably need to fix this or rename this
17
// file test_ovpncli and do ALL test that require ovpncli in this file
18
// (or have multiple test suites)
19
20
// This file needs to included with OPENVPN_EXTERN still defined otherwise
21
// the include from ovpncli.cpp breaks with duplicate symbols
22
#include <
openvpn/common/base64.hpp
>
23
24
25
#include <
client/ovpncli.cpp
>
26
27
28
#include <string>
29
#include <sstream>
30
31
namespace
unittests
{
32
TEST
(LogInfoTest, TestLogInfo)
33
{
34
std::string
msg
(
"logMessage"
);
35
openvpn::ClientAPI::LogInfo
logInfo(
msg
);
36
37
ASSERT_EQ(logInfo.
text
,
msg
);
38
}
39
}
// namespace unittests
base64.hpp
unittests
Definition
test_comp.cpp:243
unittests::TEST
TEST(CPUTime, cpu_time_pid)
Definition
test_cpu_time.cpp:110
ovpncli.cpp
openvpn::ClientAPI::LogInfo
Definition
ovpncli.hpp:439
openvpn::ClientAPI::LogInfo::text
std::string text
Definition
ovpncli.hpp:447
test_common.hpp
msg
#define msg(flags,...)
Definition
xkey_msg_compat.h:14
test
unittests
test_log.cpp
Generated by
1.9.8