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

Phase 2 tests for the rule catalogue. More...

#include <array>
#include <cstdint>
#include <span>
#include <stdexcept>
#include <utility>
#include <vector>
#include <gtest/gtest.h>
#include <ca-traits.H>
#include <tpl_ca_concepts.H>
#include <tpl_ca_storage.H>
#include <tpl_ca_lattice.H>
#include <tpl_ca_neighborhood.H>
#include <tpl_ca_rule.H>
Include dependency graph for tpl_ca_rule_test.cc:

Go to the source code of this file.

Functions

 TEST (CAGameOfLife, BlockIsStill)
 
 TEST (CAGameOfLife, BlinkerOscillatesPeriod2)
 
 TEST (CAGameOfLife, GliderMovesByOneOneEveryFourSteps)
 
 TEST (CAWolfram1D, AllRulesMatchReferenceFor10Patterns)
 
 TEST (CAWolfram1D, Rule90StepFromCenterImpulse)
 
 TEST (CAWolfram1D, LookupRuleRejectsBadArityAndStateRange)
 
 TEST (CAWolfram1D, Rule30FirstFiveStepsFromImpulse)
 
 TEST (CACompositeRule, AppliesRulesInSequence)
 
 TEST (CATotalisticRule, SumsCellAndNeighbours)
 
 TEST (CAOuterTotalisticRule, AliveCountIgnoresMagnitude)
 

Detailed Description

Phase 2 tests for the rule catalogue.

The Phase 3 engine is not yet available, so these tests advance the automaton manually: read all cells through the current lattice, compute the next state with the rule under test, swap into the next lattice, repeat. This exercises both gather_neighbors and the rule combinators.

Definition in file tpl_ca_rule_test.cc.

Function Documentation

◆ TEST() [1/10]

TEST ( CACompositeRule  ,
AppliesRulesInSequence   
)

Definition at line 333 of file tpl_ca_rule_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and r.

◆ TEST() [2/10]

TEST ( CAGameOfLife  ,
BlinkerOscillatesPeriod2   
)

◆ TEST() [3/10]

TEST ( CAGameOfLife  ,
BlockIsStill   
)

◆ TEST() [4/10]

TEST ( CAGameOfLife  ,
GliderMovesByOneOneEveryFourSteps   
)

◆ TEST() [5/10]

TEST ( CAOuterTotalisticRule  ,
AliveCountIgnoresMagnitude   
)

Definition at line 367 of file tpl_ca_rule_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and r.

◆ TEST() [6/10]

TEST ( CATotalisticRule  ,
SumsCellAndNeighbours   
)

Definition at line 353 of file tpl_ca_rule_test.cc.

References Aleph::blossom_maximum_cardinality_matching(), and r.

◆ TEST() [7/10]

TEST ( CAWolfram1D  ,
AllRulesMatchReferenceFor10Patterns   
)

◆ TEST() [8/10]

TEST ( CAWolfram1D  ,
LookupRuleRejectsBadArityAndStateRange   
)

◆ TEST() [9/10]

TEST ( CAWolfram1D  ,
Rule30FirstFiveStepsFromImpulse   
)

◆ TEST() [10/10]

TEST ( CAWolfram1D  ,
Rule90StepFromCenterImpulse   
)