summaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
Diffstat (limited to 'src/unit')
-rw-r--r--src/unit/variant.unit13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/unit/variant.unit b/src/unit/variant.unit
index ca977ee..1654c4f 100644
--- a/src/unit/variant.unit
+++ b/src/unit/variant.unit
@@ -7,6 +7,9 @@
7 */ 7 */
8 8
9#include "bu/variant.h" 9#include "bu/variant.h"
10#include "bu/membuf.h"
11#include "bu/formatter.h"
12#include "bu/string.h"
10 13
11suite Variant 14suite Variant
12{ 15{
@@ -18,4 +21,14 @@ suite Variant
18 Bu::Variant v2( v ); 21 Bu::Variant v2( v );
19 v2.get<int>(); 22 v2.get<int>();
20 } 23 }
24
25 test formatting
26 {
27 Bu::Variant v("hello");
28 Bu::MemBuf mb;
29 Bu::Formatter f( mb );
30 f << v;
31 unitTest( mb.getString() == v.get<Bu::String>() );
32
33 }
21} 34}