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