summaryrefslogtreecommitdiff
path: root/libhello/tests/basics/driver.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-04 16:16:41 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-04 16:16:41 +0200
commit4429bd6724a4668464e8a7920e3c77860b127678 (patch)
tree58c3acf5bcd852ceec69b26d52d2653d96abf22e /libhello/tests/basics/driver.cxx
parent37cabea5ada7e241777d96c39c01b7a3eae91cdc (diff)
Regenerate libhello using bdep-new
Diffstat (limited to 'libhello/tests/basics/driver.cxx')
-rw-r--r--libhello/tests/basics/driver.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/libhello/tests/basics/driver.cxx b/libhello/tests/basics/driver.cxx
new file mode 100644
index 0000000..2cef70b
--- /dev/null
+++ b/libhello/tests/basics/driver.cxx
@@ -0,0 +1,33 @@
+#include <cassert>
+#include <sstream>
+
+#include <libhello/version.hxx>
+#include <libhello/hello.hxx>
+
+using namespace std;
+using namespace hello;
+
+int main ()
+{
+ // 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");
+ }
+}