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

Phase 11 tests for cellular-automata IO and image exporters. More...

#include <cstdint>
#include <limits>
#include <set>
#include <sstream>
#include <stdexcept>
#include <string>
#include <utility>
#include <gtest/gtest.h>
#include <ca-io.H>
#include <tpl_ca_lattice.H>
#include <tpl_ca_storage.H>
Include dependency graph for ca_io_test.cc:

Go to the source code of this file.

Functions

 TEST (CAIO, RleFullFrameRoundTripPreservesExtentsAndCells)
 
 TEST (CAIO, RleTrimmedOutputMatchesCanonicalGliderShape)
 
 TEST (CAIO, RleParserAcceptsCommentsLongRunsAndConwayAliases)
 
 TEST (CAIO, RleParserRejectsMalformedInput)
 
 TEST (CAIO, RleParserBoundsTheNumberOfLiveCells)
 
 TEST (CAIO, PlaintextRoundTripPreservesFullFrame)
 
 TEST (CAIO, PlaintextParserAcceptsStarsAndRejectsUnknownGlyphs)
 
 TEST (CAIO, Life106NormalisesNegativeCoordinates)
 
 TEST (CAIO, Life106WriterProducesReadableCoordinates)
 
 TEST (CAIO, Life105RoundTripPreservesFullFrame)
 
 TEST (CAIO, Life105ParserMergesNegativeBlocks)
 
 TEST (CAIO, CsvRoundTripPreservesNumericSnapshot)
 
 TEST (CAIO, CsvReaderRejectsRaggedRowsAndBadScalars)
 
 TEST (CAIO, JsonRoundTripPreservesNumericSnapshot)
 
 TEST (CAIO, CsvAndJsonWriteByteStatesAsNumbers)
 
 TEST (CAIO, JsonReaderRejectsShapeMismatch)
 
 TEST (CAIO, JsonFrameStreamWriterEmitsStepTaggedFrames)
 
 TEST (CAIO, PgmBinaryOutputIsBitStable)
 
 TEST (CAIO, PpmBinaryOutputUsesCustomPalette)
 
 TEST (CAIO, Life106RejectsAnExtentThatDoesNotFit)
 
 TEST (CAIO, Life105RejectsCellsBeyondTheLargestCoordinate)
 
 TEST (CAIO, RleRunsThatWouldWrapAreRejected)
 
 TEST (CAIO, LoadBinaryPatternRejectsSizesThatWouldWrap)
 

Detailed Description

Phase 11 tests for cellular-automata IO and image exporters.

Definition in file ca_io_test.cc.

Function Documentation

◆ TEST() [1/23]

TEST ( CAIO  ,
CsvAndJsonWriteByteStatesAsNumbers   
)

Definition at line 320 of file ca_io_test.cc.

References Aleph::CA::write_csv(), and Aleph::CA::write_json().

◆ TEST() [2/23]

TEST ( CAIO  ,
CsvReaderRejectsRaggedRowsAndBadScalars   
)

Definition at line 290 of file ca_io_test.cc.

◆ TEST() [3/23]

TEST ( CAIO  ,
CsvRoundTripPreservesNumericSnapshot   
)

Definition at line 274 of file ca_io_test.cc.

References Aleph::CA::CSV_Options::delimiter, out, and Aleph::CA::write_csv().

◆ TEST() [4/23]

TEST ( CAIO  ,
JsonFrameStreamWriterEmitsStepTaggedFrames   
)

◆ TEST() [5/23]

TEST ( CAIO  ,
JsonReaderRejectsShapeMismatch   
)

Definition at line 336 of file ca_io_test.cc.

◆ TEST() [6/23]

TEST ( CAIO  ,
JsonRoundTripPreservesNumericSnapshot   
)

◆ TEST() [7/23]

◆ TEST() [8/23]

◆ TEST() [9/23]

TEST ( CAIO  ,
Life105RoundTripPreservesFullFrame   
)

Definition at line 241 of file ca_io_test.cc.

References out, Aleph::CA::read_life_105(), and Aleph::CA::write_life_105().

◆ TEST() [10/23]

◆ TEST() [11/23]

◆ TEST() [12/23]

◆ TEST() [13/23]

◆ TEST() [14/23]

TEST ( CAIO  ,
PgmBinaryOutputIsBitStable   
)

Definition at line 360 of file ca_io_test.cc.

References out, and Aleph::CA::write_pgm().

◆ TEST() [15/23]

TEST ( CAIO  ,
PlaintextParserAcceptsStarsAndRejectsUnknownGlyphs   
)

◆ TEST() [16/23]

◆ TEST() [17/23]

TEST ( CAIO  ,
PpmBinaryOutputUsesCustomPalette   
)

Definition at line 371 of file ca_io_test.cc.

References out, and Aleph::CA::write_ppm().

◆ TEST() [18/23]

◆ TEST() [19/23]

◆ TEST() [20/23]

TEST ( CAIO  ,
RleParserBoundsTheNumberOfLiveCells   
)

◆ TEST() [21/23]

TEST ( CAIO  ,
RleParserRejectsMalformedInput   
)

Definition at line 158 of file ca_io_test.cc.

References Aleph::CA::read_rle_string().

◆ TEST() [22/23]

◆ TEST() [23/23]

TEST ( CAIO  ,
RleTrimmedOutputMatchesCanonicalGliderShape   
)