Skip to content

Commit

Permalink
Add unsafe vector test case
Browse files Browse the repository at this point in the history
  • Loading branch information
jj683 committed Oct 24, 2024
1 parent d08c441 commit cd44156
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/flex_vector/unsafe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <immer/flex_vector.hpp>
#include <immer/memory_policy.hpp>
#include <immer/vector.hpp>

using unsafe_memory = immer::memory_policy<immer::unsafe_free_list_heap_policy<immer::cpp_heap>,
immer::no_refcount_policy,
Expand Down
20 changes: 20 additions & 0 deletions test/vector/unsafe.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// immer: immutable data structures for C++
// Copyright (C) 2016, 2017, 2018 Juan Pedro Bolivar Puente
//
// This software is distributed under the Boost Software License, Version 1.0.
// See accompanying file LICENSE or copy at http://boost.org/LICENSE_1_0.txt
//

#include <immer/memory_policy.hpp>
#include <immer/vector.hpp>

using unsafe_memory = immer::memory_policy<immer::unsafe_free_list_heap_policy<immer::cpp_heap>,
immer::no_refcount_policy,
immer::no_lock_policy>;

template <typename T>
using test_vector_t = immer::vector<T, unsafe_memory, 3u, 6u>;

#define VECTOR_T test_vector_t
#include "generic.ipp"

0 comments on commit cd44156

Please sign in to comment.