Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
ca_checkpoint_test.cc File Reference

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>
Include dependency graph for ca_checkpoint_test.cc:

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)
 

Detailed Description

Phase 15 tests for binary checkpoints, resume tokens, the Periodic_Checkpoint_Observer and the Tile_Cache.

Coverage:

  • Round-trip: ‘save → load → save’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.

Function Documentation

◆ TEST() [1/8]

TEST ( CACheckpoint  ,
InspectReturnsValidatedHeader   
)

◆ TEST() [2/8]

◆ TEST() [3/8]

TEST ( CACheckpoint  ,
PeriodicObserverWritesEveryKSteps   
)

◆ TEST() [4/8]

TEST ( CACheckpoint  ,
ResumeReproducesUninterruptedRun   
)

◆ TEST() [5/8]

TEST ( CACheckpoint  ,
RoundTripProducesIdenticalFiles   
)

◆ TEST() [6/8]

TEST ( CACheckpoint  ,
StochasticRuleResumesBitIdentically   
)

◆ TEST() [7/8]

TEST ( CACheckpointStream  ,
TileCacheLruEvictionAndPersistence   
)

◆ TEST() [8/8]

TEST ( CACheckpointStream  ,
TileCacheRejectsBadExtents   
)