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--) {
119 for (
int i = 0; i < 1000; i++) {
123 for (
int i = 999; i > 50; i--) {
127 for (
int i = 51; i < 5000; i++) {
131 for (
int i = 4999; i >= 0; i--) {
137 TEST(stack, PushMultipleAfterPop)
140 for (
int i = 0; i < 1000; i++) {
143 for (
int i = 999; i >= 0; i--) {
148 for (
int i = 0; i < 5000; i++) {
154 for (
int i = 4999; i >= 0; i--) {
182 stack.
push(std::make_unique<int>());
183 stack.
push(std::make_unique<int>());
184 std::unique_ptr<int>
a = stack.
pop();
185 std::unique_ptr<int> &
b = stack.
peek();
192 for (
int i = 0; i < 100; i++) {
198 TEST(stack, SpanConstructorExceptions)
200 std::array<ExceptionThrower, 5> values;
201 values[3].throw_during_copy =
true;
205 TEST(stack, MoveConstructorExceptions)
210 stack.
peek().throw_during_move =
true;
222 EXPECT_ANY_THROW({ stack.
push(value); });
233 stack.
peek().throw_during_move =
true;
236 EXPECT_ANY_THROW({ stack.
pop(); });
241 TEST(stack, PushMultipleExceptions)
245 std::array<ExceptionThrower, 100> values;
246 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_as(ForwardT &&...value)
void push(const T &value)
void push_multiple(Span< T > values)
void append(const T &value)
TEST(any, DefaultConstructor)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
_W64 unsigned int uintptr_t