stack_ut.cpp 325 B

12345678910111213141516
  1. #include "stack.h"
  2. #include <library/cpp/testing/unittest/registar.h>
  3. Y_UNIT_TEST_SUITE(TYStackTest) {
  4. Y_UNIT_TEST(ExplicitBool) {
  5. TStack<int> s;
  6. UNIT_ASSERT(!s);
  7. UNIT_ASSERT(s.empty());
  8. s.push(100);
  9. s.push(200);
  10. UNIT_ASSERT(s);
  11. UNIT_ASSERT(!s.empty());
  12. }
  13. }