blob: 24c29a1e03e269c8be74455e32708fd26f166ea0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <cassert>
#include <sstream>
#include <libhello/version.hxx>
#include <libhello/hello.hxx>
int main ()
{
using namespace std;
using namespace hello;
// Basics.
//
{
ostringstream o;
say_hello_formatted (o, "Hi, World!");
assert (o.str () == "Hi, World!\n");
}
{
ostringstream o;
say_hello (o, "World");
assert (o.str () == "Hello, World!\n");
}
// Volume.
//
{
ostringstream o;
say_hello (o, "World", format::volume::loud);
assert (o.str () == "HELLO, World!\n");
}
}
|