|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Tests for the Phase-7 CA observer suite. More...
#include <cstdint>#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 (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 181 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAActivityObserver | , |
| BlockIsStillSoActivityIsZero | |||
| ) |
Definition at line 194 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAComposite | , |
| FactoryPreservesLvalueObserverReferences | |||
| ) |
Definition at line 160 of file ca_observer_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::make_composite_observer().
| TEST | ( | CAComposite | , |
| FansOutBothCallbacksToEveryChild | |||
| ) |
Definition at line 145 of file ca_observer_test.cc.
References Aleph::blossom_maximum_cardinality_matching().
| TEST | ( | CAComposite | , |
| MultipleObserversObserveTheSameRun | |||
| ) |
Definition at line 358 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CADensityObserver | , |
| GoLRandomDensityLandsInExpectedBand | |||
| ) |
Definition at line 226 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), seed, and Aleph::sum().
| TEST | ( | CADensityObserver | , |
| InitialFrameIsCapturedAndStepsAccumulate | |||
| ) |
Definition at line 211 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAEntropyObserver | , |
| EntropyPositiveOnRandomFrame | |||
| ) |
Definition at line 343 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAEntropyObserver | , |
| EntropyZeroForEmptyAndConstantFrames | |||
| ) |
Definition at line 330 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CASamplingObserver | , |
| SnapshotsAtConfiguredPeriod | |||
| ) |
Definition at line 301 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CASamplingObserver | , |
| ZeroPeriodDisablesSampling | |||
| ) |
Definition at line 315 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| BlinkerYieldsCycleLengthTwo | |||
| ) |
Definition at line 257 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| BlockYieldsCycleLengthOne | |||
| ) |
Definition at line 269 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.
| TEST | ( | CAStationaryDetector | , |
| NoCycleDetectedWhenWindowIsTooSmall | |||
| ) |
Definition at line 281 of file ca_observer_test.cc.
References Aleph::CA::attach_observer(), Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::make_game_of_life_rule(), and seed.