wibble  1.1
empty.test.h
Go to the documentation of this file.
1 /* -*- C++ -*- (c) 2007 Petr Rockai <me@mornfall.net>
2  (c) 2007 Enrico Zini <enrico@enricozini.org> */
3 
4 #include <wibble/test.h>
5 #include <wibble/empty.h>
6 
7 using namespace wibble;
8 
9 struct TestEmpty {
10  Test basic() {
11  Empty<int> container;
12 
13  assert_eq(container.size(), 0u);
14 
15  Empty<int>::iterator i = container.begin();
16  assert(i == container.end());
17  assert(!(i != container.end()));
18  }
19 };
Definition: empty.h:47
Definition: empty.h:32
iterator end()
Definition: empty.h:60
size_t size() const
Definition: empty.h:57
iterator begin()
Definition: empty.h:59
Definition: amorph.h:17
Definition: empty.test.h:9
Test basic()
Definition: empty.test.h:10
void Test
Definition: test.h:178
#define assert_eq(x, y)
Definition: test.h:33
#define assert(x)
Definition: test.h:30