wibble
1.1
Main Page
Namespaces
Classes
Files
File List
File Members
wibble
singleton.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/singleton.h
>
6
7
namespace
{
8
9
using namespace
std;
10
using namespace
wibble;
11
12
struct
TestSingleton {
13
14
Test
simple() {
15
Singleton<int>
container =
singleton
(5);
16
17
assert_eq
(container.
size
(), 1u);
18
19
Singleton<int>::iterator
i = container.
begin
();
20
assert
(!(i == container.
end
()));
21
assert
(i != container.
end
());
22
assert_eq
(*i, 5);
23
24
++i;
25
assert
(i == container.
end
());
26
assert
(!(i != container.
end
()));
27
}
28
29
};
30
31
}
Generated on Wed Oct 23 2013 17:14:25 for wibble by
1.8.4