|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Phase 15 tests for binary checkpoints, resume tokens, the Periodic_Checkpoint_Observer and the Tile_Cache. More...
#include <atomic>#include <chrono>#include <cstdint>#include <filesystem>#include <fstream>#include <random>#include <sstream>#include <string>#include <vector>#include <unistd.h>#include <gtest/gtest.h>#include <ca-checkpoint.H>#include <ca-rng.H>#include <ca-streaming-storage.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>#include <tpl_ca_stochastic_rules.H>Go to the source code of this file.
Functions | |
| TEST (CACheckpoint, RoundTripProducesIdenticalFiles) | |
| TEST (CACheckpoint, ResumeReproducesUninterruptedRun) | |
| TEST (CACheckpoint, InspectReturnsValidatedHeader) | |
| TEST (CACheckpoint, StochasticRuleResumesBitIdentically) | |
| TEST (CACheckpoint, LoadRejectsTypeHashMismatch) | |
| TEST (CACheckpoint, PeriodicObserverWritesEveryKSteps) | |
| TEST (CACheckpointStream, TileCacheLruEvictionAndPersistence) | |
| TEST (CACheckpointStream, TileCacheRejectsBadExtents) | |
Phase 15 tests for binary checkpoints, resume tokens, the Periodic_Checkpoint_Observer and the Tile_Cache.
Coverage:
produces bit-identical files.Resume reproducibility:run(N) → save → load → run(N)yields the same final frame asrun(2N).Stochastic resume: master RNG seed is restored so a stochastic rule's continuation is identical to the uninterrupted run. -inspect_checkpointreturns the validated header. -Periodic_Checkpoint_Observerwrites one snapshot every k steps. -Tile_Cache` survives more touches than its capacity (LRU eviction works) and round-trips a checkerboard pattern. Definition in file ca_checkpoint_test.cc.
| TEST | ( | CACheckpoint | , |
| InspectReturnsValidatedHeader | |||
| ) |
Definition at line 213 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), h, Aleph::CA::inspect_checkpoint(), Aleph::CA::make_game_of_life_rule(), and Aleph::CA::save_checkpoint().
| TEST | ( | CACheckpoint | , |
| LoadRejectsTypeHashMismatch | |||
| ) |
Definition at line 287 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::load_checkpoint_into(), Aleph::CA::make_game_of_life_rule(), Aleph::CA::make_wolfram_elementary_rule(), row, and Aleph::CA::save_checkpoint().
| TEST | ( | CACheckpoint | , |
| PeriodicObserverWritesEveryKSteps | |||
| ) |
Definition at line 315 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::inspect_checkpoint(), and Aleph::CA::make_game_of_life_rule().
| TEST | ( | CACheckpoint | , |
| ResumeReproducesUninterruptedRun | |||
| ) |
Definition at line 179 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::load_checkpoint_into(), Aleph::CA::make_game_of_life_rule(), and Aleph::CA::save_checkpoint().
| TEST | ( | CACheckpoint | , |
| RoundTripProducesIdenticalFiles | |||
| ) |
Definition at line 149 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::load_checkpoint_into(), Aleph::CA::make_game_of_life_rule(), and Aleph::CA::save_checkpoint().
| TEST | ( | CACheckpoint | , |
| StochasticRuleResumesBitIdentically | |||
| ) |
Definition at line 242 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::load_checkpoint_into(), and Aleph::CA::save_checkpoint().
| TEST | ( | CACheckpointStream | , |
| TileCacheLruEvictionAndPersistence | |||
| ) |
Definition at line 353 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching(), and Aleph::CA::Tile_Cache< State, TileSide >::set().
| TEST | ( | CACheckpointStream | , |
| TileCacheRejectsBadExtents | |||
| ) |
Definition at line 393 of file ca_checkpoint_test.cc.
References Aleph::blossom_maximum_cardinality_matching().