aboutsummaryrefslogtreecommitdiff
path: root/test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc25
1 files changed, 25 insertions, 0 deletions
diff --git a/test.cc b/test.cc
index fa082ea..da3193f 100644
--- a/test.cc
+++ b/test.cc
@@ -17,6 +17,7 @@
#include "list/generator/iota.h"
#include "list/generator/make_list.h"
#include "list/generator/higher/list_tabulate.h"
+#include "list/operation/delete.h"
#include "function/apply.h"
@@ -434,6 +435,30 @@ static_assert(
"(remove even? (list 1 2 3)) != (list 1 3)"
);
+// list delete
+
+static_assert(
+ std::is_same<
+ tav::List<tav::Int<1>, tav::Int<3>>::type,
+ tav::Delete<
+ tav::Int<2>,
+ tav::List<tav::Int<1>, tav::Int<2>, tav::Int<3>>::type
+ >::type
+ >::value,
+ "(delete 2 (list 1 2 3)) != (list 1 3)"
+);
+
+static_assert(
+ std::is_same<
+ tav::List<tav::Int<1>, tav::Int<2>, tav::Int<3>>::type,
+ tav::Delete<
+ tav::Int<4>,
+ tav::List<tav::Int<1>, tav::Int<2>, tav::Int<3>>::type
+ >::type
+ >::value,
+ "(delete 4 (list 1 2 3)) != (list 1 2 3)"
+);
+
// list partition
static_assert(