diff options
author | Adrian Kummerlaender | 2015-02-08 19:10:59 +0100 |
---|---|---|
committer | Adrian Kummerlaender | 2015-02-08 19:10:59 +0100 |
commit | dd504e4fcbf73750097024dce397754dc5883386 (patch) | |
tree | 73c0c197c4ef8cd106d7a56092b6b5458e573f97 /test.cc | |
parent | 3feb8a168075c4007fc466a0a4353e62e69d9802 (diff) | |
download | TypeAsValue-dd504e4fcbf73750097024dce397754dc5883386.tar TypeAsValue-dd504e4fcbf73750097024dce397754dc5883386.tar.gz TypeAsValue-dd504e4fcbf73750097024dce397754dc5883386.tar.bz2 TypeAsValue-dd504e4fcbf73750097024dce397754dc5883386.tar.lz TypeAsValue-dd504e4fcbf73750097024dce397754dc5883386.tar.xz TypeAsValue-dd504e4fcbf73750097024dce397754dc5883386.tar.zst TypeAsValue-dd504e4fcbf73750097024dce397754dc5883386.zip |
Added `GreaterThan` and `LowerThan` comparators
Diffstat (limited to 'test.cc')
-rw-r--r-- | test.cc | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -107,6 +107,54 @@ static_assert( "(square 64) != 4096" ); +static_assert( + std::is_same< + tav::Boolean<true>, + tav::Odd<tav::Int<1>>::type + >::value, + "(odd? 1) != #t" +); + +static_assert( + std::is_same< + tav::Boolean<false>, + tav::Odd<tav::Int<2>>::type + >::value, + "(odd? 2) != #f" +); + +static_assert( + std::is_same< + tav::Boolean<true>, + tav::GreaterThan<tav::Int<2>, tav::Int<1>>::type + >::value, + "(> 2 1) != #f" +); + +static_assert( + std::is_same< + tav::Boolean<false>, + tav::GreaterThan<tav::Int<1>, tav::Int<2>>::type + >::value, + "(> 1 2) != #f" +); + +static_assert( + std::is_same< + tav::Boolean<true>, + tav::LowerThan<tav::Int<1>, tav::Int<2>>::type + >::value, + "(< 1 2) != #t" +); + +static_assert( + std::is_same< + tav::Boolean<false>, + tav::LowerThan<tav::Int<2>, tav::Int<1>>::type + >::value, + "(< 2 1) != #f" +); + // logic static_assert( |