5#include "testing/testing.h"
15TEST(stack, DefaultConstructor)
22TEST(stack, SpanConstructor)
24 std::array<int, 3>
array = {4, 7, 2};
33TEST(stack, CopyConstructor)
39 for (
int i = 7; i >= 1; i--) {
49TEST(stack, MoveConstructor)
55 for (
int i = 7; i >= 1; i--) {
68 for (
int i = 7; i >= 1; i--) {
82 stack2 = std::move(stack1);
85 for (
int i = 7; i >= 1; i--) {
123 for (
int i = 0; i < 1000; i++) {
127 for (
int i = 999; i > 50; i--) {
131 for (
int i = 51; i < 5000; i++) {
135 for (
int i = 4999; i >= 0; i--) {
141TEST(stack, PushMultipleAfterPop)
144 for (
int i = 0; i < 1000; i++) {
147 for (
int i = 999; i >= 0; i--) {
152 for (
int i = 0; i < 5000; i++) {
158 for (
int i = 4999; i >= 0; i--) {
186 stack.
push(std::make_unique<int>());
187 stack.
push(std::make_unique<int>());
188 std::unique_ptr<int> a = stack.
pop();
189 std::unique_ptr<int> &
b = stack.
peek();
196 for (
int i = 0; i < 100; i++) {
202TEST(stack, SpanConstructorExceptions)
204 std::array<ExceptionThrower, 5> values;
205 values[3].throw_during_copy =
true;
209TEST(stack, MoveConstructorExceptions)
214 stack.
peek().throw_during_move =
true;
226 EXPECT_ANY_THROW({ stack.
push(value); });
237 stack.
peek().throw_during_move =
true;
240 EXPECT_ANY_THROW({ stack.
pop(); });
245TEST(stack, PushMultipleExceptions)
249 std::array<ExceptionThrower, 100> values;
250 values[6].throw_during_copy =
true;
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
bool is_invariant_maintained() const
void push_as(ForwardT &&...value)
void push(const T &value)
void push_multiple(Span< T > values)
void append(const T &value)
local_group_size(16, 16) .push_constant(Type b
TEST(any, DefaultConstructor)
_W64 unsigned int uintptr_t