From 5415ecfbdc5078826e09cf6525ff5c0289cedfd4 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 15 Jan 2015 19:50:40 +0100 Subject: Added basic value type alias and math operations --- test.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test.cc') diff --git a/test.cc b/test.cc index f70f5ac..7f97762 100644 --- a/test.cc +++ b/test.cc @@ -1,5 +1,19 @@ #include "gtest/gtest.h" +#include "type.h" +#include "operation.h" + +class TypeAsValueTest : public ::testing::Test { }; + +TEST_F(TypeAsValueTest, Value) { + ASSERT_TRUE(( std::is_same::value_type>::value )); +} + +TEST_F(TypeAsValueTest, BasicMath) { + EXPECT_EQ(3, ( tav::add, tav::Int<2>>::type::value )); + EXPECT_EQ(4, ( tav::substract, tav::Int<6>>::type::value )); +} + int main(int argc, char **argv) { testing::InitGoogleTest(&argc, argv); -- cgit v1.2.3