Project
Loading...
Searching...
No Matches
testBoundedMemoryResource.cxx File Reference
#include <boost/test/unit_test.hpp>
#include <random>
#include "ITStracking/BoundedAllocator.h"

Go to the source code of this file.

Classes

class  ThrowingResource
 
class  NoDeallocateResource
 

Macros

#define BOOST_TEST_MODULE   Test Flags
 
#define BOOST_TEST_MAIN
 
#define BOOST_TEST_DYN_LINK
 

Typedefs

using Vec = bounded_vector< int >
 

Functions

auto getRandomInt (int min=-100, int max=100)
 
 BOOST_AUTO_TEST_CASE (allocation_and_clear_updates_used_memory)
 
 BOOST_AUTO_TEST_CASE (clearResizeBoundedVector_resizes_and_tracks_memory)
 
 BOOST_AUTO_TEST_CASE (upstream_throw_rolls_back_reservation)
 
 BOOST_AUTO_TEST_CASE (vector_of_bounded_vectors_deep_clear_releases_all)
 
 BOOST_AUTO_TEST_CASE (array_of_bounded_vectors_clear_resize_works)
 
 BOOST_AUTO_TEST_CASE (deepVectorClear_releases_and_reuses_resource)
 
 BOOST_AUTO_TEST_CASE (clear_with_memory_resource_without_deallocator)
 

Macro Definition Documentation

◆ BOOST_TEST_DYN_LINK

#define BOOST_TEST_DYN_LINK

Definition at line 14 of file testBoundedMemoryResource.cxx.

◆ BOOST_TEST_MAIN

#define BOOST_TEST_MAIN

Definition at line 13 of file testBoundedMemoryResource.cxx.

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Test Flags

Definition at line 12 of file testBoundedMemoryResource.cxx.

Typedef Documentation

◆ Vec

Definition at line 21 of file testBoundedMemoryResource.cxx.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/7]

BOOST_AUTO_TEST_CASE ( allocation_and_clear_updates_used_memory  )

Definition at line 75 of file testBoundedMemoryResource.cxx.

◆ BOOST_AUTO_TEST_CASE() [2/7]

BOOST_AUTO_TEST_CASE ( array_of_bounded_vectors_clear_resize_works  )

Definition at line 141 of file testBoundedMemoryResource.cxx.

◆ BOOST_AUTO_TEST_CASE() [3/7]

BOOST_AUTO_TEST_CASE ( clear_with_memory_resource_without_deallocator  )

Definition at line 173 of file testBoundedMemoryResource.cxx.

◆ BOOST_AUTO_TEST_CASE() [4/7]

BOOST_AUTO_TEST_CASE ( clearResizeBoundedVector_resizes_and_tracks_memory  )

Definition at line 92 of file testBoundedMemoryResource.cxx.

◆ BOOST_AUTO_TEST_CASE() [5/7]

BOOST_AUTO_TEST_CASE ( deepVectorClear_releases_and_reuses_resource  )

Definition at line 155 of file testBoundedMemoryResource.cxx.

◆ BOOST_AUTO_TEST_CASE() [6/7]

BOOST_AUTO_TEST_CASE ( upstream_throw_rolls_back_reservation  )

Definition at line 110 of file testBoundedMemoryResource.cxx.

◆ BOOST_AUTO_TEST_CASE() [7/7]

BOOST_AUTO_TEST_CASE ( vector_of_bounded_vectors_deep_clear_releases_all  )

Definition at line 127 of file testBoundedMemoryResource.cxx.

◆ getRandomInt()

auto getRandomInt ( int  min = -100,
int  max = 100 
)

Definition at line 22 of file testBoundedMemoryResource.cxx.