#define CDSSTRESS_SequentialTreiberStack_F(test_fixture, type_name) \
TEST_F(test_fixture, type_name) { \
typedef stack::Types<value_type>::type_name stack_type; \
- stack_type stack; \
- test(stack); \
+ std::unique_ptr<stack_type> stack(new stack_type()); \
+ test(*stack); \
}
#define CDSSTRESS_SequentialEliminationStack_F(test_fixture, type_name) \
TEST_F(test_fixture, type_name) { \
typedef stack::Types<value_type>::type_name stack_type; \
- stack_type stack(s_nSequentialEliminationSize); \
- test(stack); \
+ std::unique_ptr<stack_type> stack( \
+ new stack_type(s_nSequentialEliminationSize)); \
+ test(*stack); \
}
#define CDSSTRESS_SequentialTreiberStack(test_fixture) \
GetConfig(SequentialEliminationSize);
}
- template <typename Stack> void test(Stack &stack) {
+ template <typename Stack>
+ void test(Stack &stack) {
size_t push_error_cnt = 0;
size_t pop_sum = 0;
value_type v;
}
};
-CDSSTRESS_SequentialTreiberStack(sequential_stack)
- CDSSTRESS_SequentialEliminationStack(sequential_stack)
+CDSSTRESS_SequentialTreiberStack(sequential_stack);
+CDSSTRESS_SequentialEliminationStack(sequential_stack);
} // namespace