mirror of
https://github.com/boostorg/contract.git
synced 2026-01-26 06:22:42 +00:00
26 lines
384 B
C++
26 lines
384 B
C++
|
|
//[meyer97_stack4_main
|
|
#include "stack4.hpp"
|
|
#include <cassert>
|
|
|
|
int main() {
|
|
stack4<int> s(3);
|
|
assert(s.capacity() == 3);
|
|
assert(s.count() == 0);
|
|
assert(s.empty());
|
|
assert(!s.full());
|
|
|
|
s.put(123);
|
|
assert(!s.empty());
|
|
assert(!s.full());
|
|
assert(s.item() == 123);
|
|
|
|
s.remove();
|
|
assert(s.empty());
|
|
assert(!s.full());
|
|
|
|
return 0;
|
|
}
|
|
//]
|
|
|