diff options
Diffstat (limited to 'libformat/tests/basics')
-rw-r--r-- | libformat/tests/basics/buildfile | 3 | ||||
-rw-r--r-- | libformat/tests/basics/driver.cxx | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libformat/tests/basics/buildfile b/libformat/tests/basics/buildfile new file mode 100644 index 0000000..813cb7e --- /dev/null +++ b/libformat/tests/basics/buildfile @@ -0,0 +1,3 @@ +import libs = libformat%lib{format} + +exe{driver}: {hxx ixx txx cxx}{*} $libs diff --git a/libformat/tests/basics/driver.cxx b/libformat/tests/basics/driver.cxx new file mode 100644 index 0000000..03faea7 --- /dev/null +++ b/libformat/tests/basics/driver.cxx @@ -0,0 +1,14 @@ +#include <cassert> + +#include <libformat/version.hxx> +#include <libformat/format.hxx> + +using namespace std; +using namespace format; + +int main () +{ + assert (format_hello ("Hello", "World", volume::quiet) == "hello, World!"); + assert (format_hello ("Hello", "World", volume::normal) == "Hello, World!"); + assert (format_hello ("Hello", "World", volume::loud) == "HELLO, World!"); +} |