7 #include "testing/testing.h"
11 TEST(stack, DefaultConstructor)
18 TEST(stack, SpanConstructor)
20 std::array<int, 3>
array = {4, 7, 2};
29 TEST(stack, CopyConstructor)
35 for (
int i = 7; i >= 1; i--) {
45 TEST(stack, MoveConstructor)
51 for (
int i = 7; i >= 1; i--) {
56 TEST(stack, CopyAssignment)
64 for (
int i = 7; i >= 1; i--) {
74 TEST(stack, MoveAssignment)
78 stack2 = std::move(stack1);
81 for (
int i = 7; i >= 1; i--) {
110 for (
int i = 0; i < 1000; i++) {
114 for (
int i = 999; i > 50; i--) {
118 for (
int i = 51; i < 5000; i++) {
122 for (
int i = 4999; i >= 0; i--) {
128 TEST(stack, PushMultipleAfterPop)
131 for (
int i = 0; i < 1000; i++) {
134 for (
int i = 999; i >= 0; i--) {
139 for (
int i = 0; i < 5000; i++) {
145 for (
int i = 4999; i >= 0; i--) {
173 stack.
push(std::make_unique<int>());
174 stack.
push(std::make_unique<int>());
175 std::unique_ptr<int>
a = stack.
pop();
176 std::unique_ptr<int> &b = stack.
peek();
183 for (
int i = 0; i < 100; i++) {
189 TEST(stack, SpanConstructorExceptions)
191 std::array<ExceptionThrower, 5> values;
192 values[3].throw_during_copy =
true;
196 TEST(stack, MoveConstructorExceptions)
201 stack.
peek().throw_during_move =
true;
213 EXPECT_ANY_THROW({ stack.
push(value); });
224 stack.
peek().throw_during_move =
true;
227 EXPECT_ANY_THROW({ stack.
pop(); });
232 TEST(stack, PushMultipleExceptions)
236 std::array<ExceptionThrower, 100> values;
237 values[6].throw_during_copy =
true;
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
Strict compiler flags for areas of code we want to ensure don't do conversions without us knowing abo...
bool is_invariant_maintained() const
void push(const T &value)
void push_multiple(Span< T > values)
void append(const T &value)
TEST(array, DefaultConstructor)
_W64 unsigned int uintptr_t