blob: cc16293cb4eecca088497255934695baa700574c [file] [log] [blame]
William A. Kennington III5a528022021-04-28 12:52:43 -07001#include <gtest/gtest.h>
2#include <stdplus/dl.hpp>
3
4namespace stdplus
5{
6
7TEST(Dl, FailedOpen)
8{
9 EXPECT_THROW(Dl("nodl.so", DlOpenFlags(DlOpenType::Now)),
10 std::runtime_error);
11}
12
13TEST(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