Skip to content

Commit 5e6489a

Browse files
Fixed typo in test
1 parent 9c619dd commit 5e6489a

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

include/rfl/internal/cpp26/get_members.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ consteval std::vector<std::meta::info> get_members() {
3838
template for (const size_t i :
3939
std::make_index_sequence<nonstatic_members.size()>()) {
4040
members.push_back(nonstatic_members[i]);
41-
};
41+
}
4242

4343
return members;
4444
}

tests/generic/test_result.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
#include <gtest/gtest.h>
22

3+
#include <rfl.hpp>
34
#include <string>
45
#include <type_traits>
56

6-
#include <rfl.hpp>
7-
87
namespace test_result_cross_assign {
98

109
TEST(regression, result_cross_type_assign_error_clears_success) {
1110
auto ok = rfl::Result<int>(42);
1211
ASSERT_TRUE(ok);
1312

14-
const auto err = rfl::Result<long>(rfl::Error("fail"));
13+
const auto err = rfl::Result<long>(rfl::error("fail"));
1514
ASSERT_FALSE(err);
1615

1716
ok = err;
18-
EXPECT_FALSE(ok)
19-
<< "After assigning an error Result<long> to Result<int>, "
20-
"the target should be falsy";
17+
EXPECT_FALSE(ok) << "After assigning an error Result<long> to Result<int>, "
18+
"the target should be falsy";
2119
}
2220

2321
} // namespace test_result_cross_assign
@@ -26,8 +24,8 @@ namespace test_result_value_or_return_type {
2624

2725
TEST(regression, result_value_or_returns_value_not_rvalue_ref) {
2826
using ResultType = rfl::Result<std::string>;
29-
using ReturnType = decltype(
30-
std::declval<ResultType&&>().value_or(std::string("default")));
27+
using ReturnType =
28+
decltype(std::declval<ResultType&&>().value_or(std::string("default")));
3129
constexpr bool returns_value = std::is_same_v<ReturnType, std::string>;
3230
EXPECT_TRUE(returns_value)
3331
<< "Result::value_or(T&&) should return T by value, not T&&. "
@@ -40,13 +38,13 @@ namespace test_result_error_rvalue_return_type {
4038

4139
TEST(regression, result_error_rvalue_qualified_returns_rvalue_ref) {
4240
using ResultType = rfl::Result<int>;
43-
using ReturnType =
44-
decltype(std::declval<ResultType&&>().error());
41+
using ReturnType = decltype(std::declval<ResultType&&>().error());
4542
constexpr bool returns_rvalue_ref = std::is_same_v<ReturnType, rfl::Error&&>;
4643
constexpr bool returns_lvalue_ref = std::is_same_v<ReturnType, rfl::Error&>;
4744
EXPECT_TRUE(returns_rvalue_ref)
4845
<< "Result::error() && should return Error&&, not Error&. "
49-
"Currently returns lvalue ref: " << returns_lvalue_ref;
46+
"Currently returns lvalue ref: "
47+
<< returns_lvalue_ref;
5048
}
5149

5250
} // namespace test_result_error_rvalue_return_type

0 commit comments

Comments
 (0)