William A. Kennington III | 5a52802 | 2021-04-28 12:52:43 -0700 | [diff] [blame^] | 1 | #include <gtest/gtest.h> |
2 | #include <stdplus/dl.hpp> | ||||
3 | |||||
4 | namespace stdplus | ||||
5 | { | ||||
6 | |||||
7 | TEST(Dl, FailedOpen) | ||||
8 | { | ||||
9 | EXPECT_THROW(Dl("nodl.so", DlOpenFlags(DlOpenType::Now)), | ||||
10 | std::runtime_error); | ||||
11 | } | ||||
12 | |||||
13 | TEST(Dl, GetLinkMap) | ||||
14 | { | ||||
15 | Dl dl(nullptr, DlOpenFlags(DlOpenType::Now) | ||||
16 | .set(DlOpenFlag::Global) | ||||
17 | .set(DlOpenFlag::NoLoad)); | ||||
18 | EXPECT_NE(nullptr, dl.linkMap()); | ||||
19 | } | ||||
20 | |||||
21 | } // namespace stdplus |