aboutsummaryrefslogtreecommitdiff
path: root/test.cc
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-02-10 18:40:05 +0100
committerAdrian Kummerlaender2015-02-10 18:40:05 +0100
commitf1268ca3bf10ab136bafbd63894ce12353fa8690 (patch)
tree047add598bc7ac82de9931ebd9b0780cf2dfbbb4 /test.cc
parent8893f72598040681aec3de58740212c0003fc65b (diff)
downloadTypeAsValue-f1268ca3bf10ab136bafbd63894ce12353fa8690.tar
TypeAsValue-f1268ca3bf10ab136bafbd63894ce12353fa8690.tar.gz
TypeAsValue-f1268ca3bf10ab136bafbd63894ce12353fa8690.tar.bz2
TypeAsValue-f1268ca3bf10ab136bafbd63894ce12353fa8690.tar.lz
TypeAsValue-f1268ca3bf10ab136bafbd63894ce12353fa8690.tar.xz
TypeAsValue-f1268ca3bf10ab136bafbd63894ce12353fa8690.tar.zst
TypeAsValue-f1268ca3bf10ab136bafbd63894ce12353fa8690.zip
Moved `Sort` list index deletion into `DeleteNth` function
* as it is commonly required functionality and as such should be provided by this library
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/test.cc b/test.cc
index 8a5c499..931d8f1 100644
--- a/test.cc
+++ b/test.cc
@@ -19,6 +19,7 @@
#include "list/generator/make_list.h"
#include "list/generator/higher/list_tabulate.h"
#include "list/operation/delete.h"
+#include "list/operation/delete_nth.h"
#include "function/apply.h"
@@ -595,6 +596,19 @@ static_assert(
"(delete 4 (list 1 2 3)) != (list 1 2 3)"
);
+// list delete nth
+
+static_assert(
+ std::is_same<
+ tav::List<tav::Int<1>, tav::Int<3>>::type,
+ tav::DeleteNth<
+ tav::Size<1>,
+ tav::List<tav::Int<1>, tav::Int<2>, tav::Int<3>>::type
+ >::type
+ >::value,
+ "(delete-nth 1 (list 1 2 3)) != (list 1 3)"
+);
+
// list partition
static_assert(