File: stack_allocator.cpp

package info (click to toggle)
iqtree 2.0.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,700 kB
  • sloc: cpp: 142,571; ansic: 57,789; sh: 275; python: 242; makefile: 95
file content (16 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <catch.hpp>

#include "../lib/stack_allocator.hpp"

namespace terraces {
namespace tests {

TEST_CASE("stack_allocator basic", "[utils][utils::stack_allocator]") {
	utils::free_list fl;
	utils::stack_allocator<int> alloc{fl, 10};
	std::vector<int, utils::stack_allocator<int>> vec(alloc);
	CHECK_NOTHROW(vec.reserve(10));
}

} // namespace tests
} // namespace terraces