Skip to content

Commit 7a86847

Browse files
committed
add Result void specialization test
1 parent a930af2 commit 7a86847

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/Result.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ class MyError : public zest::ResultError {};
77

88
class MyError2 : public zest::ResultError {};
99

10+
zest::Result<void, MyError> test_function_1() {
11+
// return nothing
12+
return {};
13+
// return MyError
14+
return MyError();
15+
}
16+
1017
constexpr void compile_time_tests() {
1118
// test sentinel values
1219
static_assert(zest::sentinel_v<int32_t> == INT32_MAX);

0 commit comments

Comments
 (0)