From dd504e4fcbf73750097024dce397754dc5883386 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 8 Feb 2015 19:10:59 +0100 Subject: Added `GreaterThan` and `LowerThan` comparators --- test.cc | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'test.cc') diff --git a/test.cc b/test.cc index 9037e25..65a048b 100644 --- a/test.cc +++ b/test.cc @@ -107,6 +107,54 @@ static_assert( "(square 64) != 4096" ); +static_assert( + std::is_same< + tav::Boolean, + tav::Odd>::type + >::value, + "(odd? 1) != #t" +); + +static_assert( + std::is_same< + tav::Boolean, + tav::Odd>::type + >::value, + "(odd? 2) != #f" +); + +static_assert( + std::is_same< + tav::Boolean, + tav::GreaterThan, tav::Int<1>>::type + >::value, + "(> 2 1) != #f" +); + +static_assert( + std::is_same< + tav::Boolean, + tav::GreaterThan, tav::Int<2>>::type + >::value, + "(> 1 2) != #f" +); + +static_assert( + std::is_same< + tav::Boolean, + tav::LowerThan, tav::Int<2>>::type + >::value, + "(< 1 2) != #t" +); + +static_assert( + std::is_same< + tav::Boolean, + tav::LowerThan, tav::Int<1>>::type + >::value, + "(< 2 1) != #f" +); + // logic static_assert( -- cgit v1.2.3