[libcxx-commits] [libcxx] [libc++][test] Refactor tests for std::{copy, move, fill} algorithms (PR #120909)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Dec 22 10:13:49 PST 2024
================
@@ -15,23 +15,30 @@
#include <algorithm>
#include <cassert>
+#include "common.h"
#include "test_macros.h"
#include "test_iterators.h"
+#include "type_algorithms.h"
-class PaddedBase {
-public:
- TEST_CONSTEXPR PaddedBase(std::int16_t a, std::int8_t b) : a_(a), b_(b) {}
-
- std::int16_t a_;
- std::int8_t b_;
-};
-
-class Derived : public PaddedBase {
-public:
- TEST_CONSTEXPR Derived(std::int16_t a, std::int8_t b, std::int8_t c) : PaddedBase(a, b), c_(c) {}
+TEST_CONSTEXPR_CXX20 void test_padding() {
----------------
philnik777 wrote:
Please don't put individual tests in functions. That makes the test just harder to read AFAICT, since it only adds additional code.
https://github.com/llvm/llvm-project/pull/120909
More information about the libcxx-commits
mailing list