aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-02-01 13:21:34 +0100
committerAdrian Kummerlaender2015-02-01 13:21:34 +0100
commit2e167e9772f36f5e2239800e2e76e10bbb940e60 (patch)
treeeb99ca9f72501a890d345dc06d0a689931181d39
parent70429313c8d917255c35dabe14f64209dd6463db (diff)
downloadTypeAsValue-2e167e9772f36f5e2239800e2e76e10bbb940e60.tar
TypeAsValue-2e167e9772f36f5e2239800e2e76e10bbb940e60.tar.gz
TypeAsValue-2e167e9772f36f5e2239800e2e76e10bbb940e60.tar.bz2
TypeAsValue-2e167e9772f36f5e2239800e2e76e10bbb940e60.tar.lz
TypeAsValue-2e167e9772f36f5e2239800e2e76e10bbb940e60.tar.xz
TypeAsValue-2e167e9772f36f5e2239800e2e76e10bbb940e60.tar.zst
TypeAsValue-2e167e9772f36f5e2239800e2e76e10bbb940e60.zip
Restored synchronisation between assert messages and their types
-rw-r--r--test.cc62
1 files 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<1>, tav::Int<2>>::type
- >::type
+ tav::List<tav::Int<1>>::type,
+ tav::Take<
+ tav::Size<1>,
+ tav::List<tav::Int<1>, 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<1>, tav::Int<2>>::type
- >::type
+ tav::List<tav::Int<1>, tav::Int<2>>::type,
+ tav::Take<
+ tav::Size<2>,
+ tav::List<tav::Int<1>, 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<1>, tav::Int<2>>::type
- >::type
+ tav::List<tav::Int<1>, tav::Int<2>>::type,
+ tav::Take<
+ tav::Size<3>,
+ tav::List<tav::Int<1>, 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<tav::Int<1>>::type,
- tav::List<tav::Int<2>>::type
- >::type
+ tav::List<tav::Int<1>, tav::Int<2>>::type,
+ tav::Append<
+ tav::List<tav::Int<1>>::type,
+ tav::List<tav::Int<2>>::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<1>, tav::Int<2>>::type,
- tav::List<tav::Int<3>, tav::Int<4>>::type
- >::type
+ tav::List<tav::Int<1>, tav::Int<2>, tav::Int<3>, tav::Int<4>>::type,
+ tav::Append<
+ tav::List<tav::Int<1>, tav::Int<2>>::type,
+ tav::List<tav::Int<3>, 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