From 2e167e9772f36f5e2239800e2e76e10bbb940e60 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sun, 1 Feb 2015 13:21:34 +0100 Subject: Restored synchronisation between assert messages and their types --- test.cc | 62 ++++++++++++++++++++++++++------------------------------------ 1 file changed, 26 insertions(+), 36 deletions(-) diff --git a/test.cc b/test.cc index 9351afd..fa082ea 100644 --- a/test.cc +++ b/test.cc @@ -323,69 +323,59 @@ static_assert( static_assert( std::is_same< - tav::Size<1>, - tav::Length< - tav::Take< - tav::Size<1>, - tav::List, tav::Int<2>>::type - >::type + tav::List>::type, + tav::Take< + tav::Size<1>, + tav::List, tav::Int<2>>::type >::type >::value, - "(length (take 1 (list 1 2))) != 1" + "(take 1 (list 1 2)) != (list 1)" ); static_assert( std::is_same< - tav::Size<2>, - tav::Length< - tav::Take< - tav::Size<2>, - tav::List, tav::Int<2>>::type - >::type + tav::List, tav::Int<2>>::type, + tav::Take< + tav::Size<2>, + tav::List, tav::Int<2>>::type >::type >::value, - "(length (take 2 (list 1 2))) != 2" + "(take 2 (list 1 2)) != (list 1 2)" ); static_assert( std::is_same< - tav::Size<2>, - tav::Length< - tav::Take< - tav::Size<3>, - tav::List, tav::Int<2>>::type - >::type + tav::List, tav::Int<2>>::type, + tav::Take< + tav::Size<3>, + tav::List, tav::Int<2>>::type >::type >::value, - "(length (take 3 (list 1 2))) != 2" + "(take 3 (list 1 2)) != (list 1 2)" ); // list append static_assert( std::is_same< - tav::Size<2>, - tav::Length< - tav::Append< - tav::List>::type, - tav::List>::type - >::type + tav::List, tav::Int<2>>::type, + tav::Append< + tav::List>::type, + tav::List>::type >::type >::value, - "(length (append (list 1) (list 2))) != 2" + "(append (list 1) (list 2)) != (list 1 2)" ); static_assert( std::is_same< - tav::Size<4>, - tav::Length< - tav::Append< - tav::List, tav::Int<2>>::type, - tav::List, tav::Int<4>>::type - >::type + tav::List, tav::Int<2>, tav::Int<3>, tav::Int<4>>::type, + tav::Append< + tav::List, tav::Int<2>>::type, + tav::List, tav::Int<4>>::type >::type >::value, - "(length (append (list 1 2) (list 3 4))) != 4" + "(append (list 1 2) (list 3 4)) != (list 1 2 3 4)" ); // list fold @@ -577,7 +567,7 @@ static_assert( >::type >::type >::value, - "(length (concatenate (list (list 1 2) (list 3) (list 4 5 6)))) != 6" + "(concatenate (list (list 1 2) (list 3) (list 4 5 6))) != (list 1 2 3 4 5 6)" ); // list iota -- cgit v1.2.3