|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Tests for the Phase-7 CA observer suite. More...
#include <cstdint>#include <limits>#include <random>#include <vector>#include <gtest/gtest.h>#include <ca-engine-utils.H>#include <ca-metrics.H>#include <ca-observer.H>#include <ca-traits.H>#include <tpl_ca_engine.H>#include <tpl_ca_lattice.H>#include <tpl_ca_neighborhood.H>#include <tpl_ca_rule.H>#include <tpl_ca_storage.H>Go to the source code of this file.
Functions | |
| TEST (CAComposite, FansOutBothCallbacksToEveryChild) | |
| TEST (CAComposite, FactoryPreservesLvalueObserverReferences) | |
| TEST (CAActivityObserver, BlinkerReportsFourChangesPerStep) | |
| TEST (CAActivityObserver, BlockIsStillSoActivityIsZero) | |
| TEST (CADensityObserver, InitialFrameIsCapturedAndStepsAccumulate) | |
| TEST (CADensityObserver, GoLRandomDensityLandsInExpectedBand) | |
| TEST (CAStationaryDetector, BlinkerYieldsCycleLengthTwo) | |
| TEST (CAStationaryDetector, BlockYieldsCycleLengthOne) | |
| TEST (CAStationaryDetector, NoCycleDetectedWhenWindowIsTooSmall) | |
| TEST (CAStationaryDetector, TheWindowKeepsOneFrameMoreThanTheCycleLength) | |
| TEST (CAStationaryDetector, AWindowOfSizeMaxKeepsEveryFrame) | |
| TEST (CASamplingObserver, SnapshotsAtConfiguredPeriod) | |
| TEST (CASamplingObserver, ZeroPeriodDisablesSampling) | |
| TEST (CAEntropyObserver, EntropyZeroForEmptyAndConstantFrames) | |
| TEST (CAEntropyObserver, EntropyPositiveOnRandomFrame) | |
| TEST (CAComposite, MultipleObserversObserveTheSameRun) | |
Tests for the Phase-7 CA observer suite.
Scope:
ObserverLike).Composite_Observer dispatches on_step_begin/end to all children.Density_Observer records initial frame + one sample per step.Activity_Observer reports 4 changed cells per step on a blinker (canonical Phase-7 acceptance criterion).Stationary_Detector reports cycle length 2 on a blinker.Stationary_Detector reports cycle length 1 on a still life.Sampling_Observer snapshots at the configured period.Entropy_Observer produces a non-trivial time series for a random GoL seed.Definition in file ca_observer_test.cc.
| TEST | ( | CAActivityObserver | , |
| BlinkerReportsFourChangesPerStep | |||
| ) |
Definition at line 182 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAActivityObserver | , |
| BlockIsStillSoActivityIsZero | |||
| ) |
Definition at line 195 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAComposite | , |
| FactoryPreservesLvalueObserverReferences | |||
| ) |
Definition at line 161 of file ca_observer_test.cc.
References Aleph::CA::make_composite_observer().
| TEST | ( | CAComposite | , |
| FansOutBothCallbacksToEveryChild | |||
| ) |
Definition at line 146 of file ca_observer_test.cc.
References Aleph::CA::Composite_Observer< Observers >::on_step_begin(), and Aleph::CA::Composite_Observer< Observers >::on_step_end().
| TEST | ( | CAComposite | , |
| MultipleObserversObserveTheSameRun | |||
| ) |
| TEST | ( | CADensityObserver | , |
| GoLRandomDensityLandsInExpectedBand | |||
| ) |
Definition at line 227 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), seed, and Aleph::sum().
| TEST | ( | CADensityObserver | , |
| InitialFrameIsCapturedAndStepsAccumulate | |||
| ) |
Definition at line 212 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAEntropyObserver | , |
| EntropyPositiveOnRandomFrame | |||
| ) |
Definition at line 373 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAEntropyObserver | , |
| EntropyZeroForEmptyAndConstantFrames | |||
| ) |
Definition at line 360 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CASamplingObserver | , |
| SnapshotsAtConfiguredPeriod | |||
| ) |
Definition at line 331 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CASamplingObserver | , |
| ZeroPeriodDisablesSampling | |||
| ) |
Definition at line 345 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| AWindowOfSizeMaxKeepsEveryFrame | |||
| ) |
Definition at line 314 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| BlinkerYieldsCycleLengthTwo | |||
| ) |
Definition at line 258 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| BlockYieldsCycleLengthOne | |||
| ) |
Definition at line 270 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| NoCycleDetectedWhenWindowIsTooSmall | |||
| ) |
Definition at line 282 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| TheWindowKeepsOneFrameMoreThanTheCycleLength | |||
| ) |
Definition at line 298 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::CA::make_game_of_life_rule(), and seed.