From 4599b111974c6957d6919845eb225d63b190bddc Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 18 Nov 2015 14:43:51 +1100 Subject: [PATCH] strongdef: add trivial instantiation test --- Makefile.am | 1 + test/strongdef.cpp | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/strongdef.cpp diff --git a/Makefile.am b/Makefile.am index eef805cd..81f2fdd7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -445,6 +445,7 @@ TEST_BIN = \ test/sha2 \ test/signal \ test/stringid \ + test/strongdef \ test/tuple \ test/uri \ test/vector \ diff --git a/test/strongdef.cpp b/test/strongdef.cpp new file mode 100644 index 00000000..4e2551e5 --- /dev/null +++ b/test/strongdef.cpp @@ -0,0 +1,18 @@ +#include "tap.hpp" +#include "strongdef.hpp" + +using util::strongdef; + + +int +main (void) +{ + util::TAP::logger tap; + + // These tests are less about functional testing, and more about link testing. + strongdef fortytwo (42u); + tap.expect_eq (fortytwo.data, 42u, "raw data equality"); + tap.expect_eq (fortytwo, 42u, "passthrough equality"); + + return tap.status (); +}