aboutsummaryrefslogtreecommitdiff
path: root/test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/test.cc b/test.cc
index 219bfe5..4e97b7a 100644
--- a/test.cc
+++ b/test.cc
@@ -2,6 +2,7 @@
#include "type.h"
#include "operation/math.h"
+#include "conditional/if.h"
class TypeAsValueTest : public ::testing::Test { };
@@ -16,6 +17,11 @@ TEST_F(TypeAsValueTest, BasicMath) {
EXPECT_EQ(5, ( tav::divide<tav::Int<10>, tav::Int<2>>::value ));
}
+TEST_F(TypeAsValueTest, Conditional) {
+ EXPECT_EQ(1, ( tav::If<true, tav::Int<1>, tav::Int<2>>::value ));
+ EXPECT_EQ(2, ( tav::If<false, tav::Int<1>, tav::Int<2>>::value ));
+}
+
int main(int argc, char **argv) {
testing::InitGoogleTest(&argc, argv);