|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Stationary_Detector when an allocation fails: buffering the hash of a frame throws std::bad_alloc, which reaches the caller of the callback, and leaves the hashes and their steps as they were. More...
#include <gtest/gtest.h>#include "allocation_failure.H"#include <cstddef>#include <limits>#include <new>#include <string>#include <utility>#include <ca-observer.H>#include <tpl_array.H>#include <tpl_ca_lattice.H>#include <tpl_ca_storage.H>Go to the source code of this file.
Functions | |
| TEST (StationaryDetectorAllocation, AFailedBufferingReachesTheCaller) | |
| TEST (StationaryDetectorAllocation, AFullSmallWindowKeepsEachHashWithItsStep) | |
| TEST (StationaryDetectorAllocation, AFrameLostToAFailureMakesNoLongerCycle) | |
Stationary_Detector when an allocation fails: buffering the hash of a frame throws std::bad_alloc, which reaches the caller of the callback, and leaves the hashes and their steps as they were.
This program replaces the global operator new, so that a test can make an allocation fail.
Definition in file ca_observer_allocation_test.cc.
| TEST | ( | StationaryDetectorAllocation | , |
| AFailedBufferingReachesTheCaller | |||
| ) |
Definition at line 81 of file ca_observer_allocation_test.cc.
References ALEPH_ALLOCATION_FAILURE_UNDER_TSAN, Aleph::CA::Stationary_Detector::buffered_hashes(), Aleph::CA::Stationary_Detector::cycle_detected(), Aleph::CA::Stationary_Detector::cycle_length(), Aleph::CA::Stationary_Detector::cycle_start(), k, Aleph::CA::Stationary_Detector::on_step_begin(), and Aleph::CA::Stationary_Detector::on_step_end().
| TEST | ( | StationaryDetectorAllocation | , |
| AFrameLostToAFailureMakesNoLongerCycle | |||
| ) |
Definition at line 182 of file ca_observer_allocation_test.cc.
References ALEPH_ALLOCATION_FAILURE_UNDER_TSAN, Aleph::CA::Stationary_Detector::cycle_detected(), Aleph::CA::Stationary_Detector::cycle_length(), Aleph::CA::Stationary_Detector::cycle_start(), k, Aleph::CA::Stationary_Detector::on_step_begin(), and Aleph::CA::Stationary_Detector::on_step_end().
| TEST | ( | StationaryDetectorAllocation | , |
| AFullSmallWindowKeepsEachHashWithItsStep | |||
| ) |
Definition at line 133 of file ca_observer_allocation_test.cc.
References ALEPH_ALLOCATION_FAILURE_UNDER_TSAN, Aleph::CA::Stationary_Detector::buffered_hashes(), Aleph::CA::Stationary_Detector::cycle_detected(), Aleph::CA::Stationary_Detector::cycle_length(), Aleph::CA::Stationary_Detector::cycle_start(), k, Aleph::CA::Stationary_Detector::on_step_begin(), and Aleph::CA::Stationary_Detector::on_step_end().