blob: 65bd816e48b95b2d81622c549b613d4a6cb25442 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
#include <gtest/gtest.h>
#include <crepe/util/OptionalRef.h>
using namespace std;
using namespace crepe;
using namespace testing;
TEST(OptionalRefTest, Explicit) {
string value = "foo";
OptionalRef<string> ref;
EXPECT_FALSE(bool(ref));
ASSERT_THROW(ref.get(), runtime_error);
}
|