aboutsummaryrefslogtreecommitdiff
path: root/test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test.cc')
-rw-r--r--test.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/test.cc b/test.cc
index 7a2e963..774f9be 100644
--- a/test.cc
+++ b/test.cc
@@ -22,6 +22,7 @@
#include "list/generator/higher/list_tabulate.h"
#include "list/operation/delete.h"
#include "list/operation/delete_nth.h"
+#include "list/operation/replace_nth.h"
#include "function/apply.h"
@@ -666,6 +667,20 @@ static_assert(
"(delete-nth 1 (list 1 2 3)) != (list 1 3)"
);
+// list replace nth
+
+static_assert(
+ std::is_same<
+ tav::List<tav::Int<1>, tav::Int<42>, tav::Int<3>>,
+ tav::ReplaceNth<
+ tav::Size<1>,
+ tav::Int<42>,
+ tav::List<tav::Int<1>, tav::Int<2>, tav::Int<3>>
+ >
+ >::value,
+ "(replace-nth 1 42 (list 1 2 3)) != (list 1 42 3)"
+);
+
// list partition
static_assert(