aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/stack_ut.cpp
blob: d60115caad813fa76d05fb3a775d5ba31a28ce62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "stack.h" 
 
#include <library/cpp/testing/unittest/registar.h>
 
Y_UNIT_TEST_SUITE(TYStackTest) {
    Y_UNIT_TEST(ExplicitBool) {
        TStack<int> s;
 
        UNIT_ASSERT(!s); 
        UNIT_ASSERT(s.empty());
        s.push(100); 
        s.push(200); 
        UNIT_ASSERT(s);
        UNIT_ASSERT(!s.empty()); 
    } 
}