Skip to content

Commit 6caff7e

Browse files
committed
Cleanup test
1 parent 71a5483 commit 6caff7e

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

test/base-test.cc

+5-11
Original file line numberDiff line numberDiff line change
@@ -93,26 +93,20 @@ TEST(string_view_test, compare) {
9393
}
9494

9595
#if FMT_USE_CONSTEVAL
96-
namespace {
97-
9896
template <size_t N> struct fixed_string {
9997
char data[N] = {};
10098

10199
constexpr fixed_string(const char (&m)[N]) {
102-
for (size_t i = 0; i != N; ++i) {
103-
data[i] = m[i];
104-
}
100+
for (size_t i = 0; i != N; ++i) data[i] = m[i];
105101
}
106102
};
107103

108-
} // namespace
109-
110104
TEST(string_view_test, from_constexpr_fixed_string) {
111-
static constexpr auto fs = fixed_string<5>("x={}");
112-
static constexpr auto fmt = fmt::string_view(fs.data);
113-
EXPECT_EQ(fmt, "x={}");
105+
static constexpr auto fs = fixed_string<4>("foo");
106+
static constexpr auto sv = fmt::string_view(fs.data);
107+
EXPECT_EQ(sv, "foo");
114108
}
115-
#endif
109+
#endif // FMT_USE_CONSTEVAL
116110

117111
TEST(base_test, is_locking) {
118112
EXPECT_FALSE(fmt::detail::is_locking<const char(&)[3]>());

0 commit comments

Comments
 (0)