|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
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>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) | |
Phase 11 tests for cellular-automata IO and image exporters.
Definition in file ca_io_test.cc.
| TEST | ( | CAIO | , |
| CsvAndJsonWriteByteStatesAsNumbers | |||
| ) |
Definition at line 320 of file ca_io_test.cc.
References Aleph::CA::write_csv(), and Aleph::CA::write_json().
| TEST | ( | CAIO | , |
| CsvReaderRejectsRaggedRowsAndBadScalars | |||
| ) |
Definition at line 290 of file ca_io_test.cc.
| 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 | ( | CAIO | , |
| JsonFrameStreamWriterEmitsStepTaggedFrames | |||
| ) |
Definition at line 344 of file ca_io_test.cc.
References Aleph::CA::JSON_Frame_Stream_Writer::accept(), Aleph::CA::JSON_Frame_Stream_Writer::close(), and out.
| TEST | ( | CAIO | , |
| JsonReaderRejectsShapeMismatch | |||
| ) |
Definition at line 336 of file ca_io_test.cc.
| TEST | ( | CAIO | , |
| JsonRoundTripPreservesNumericSnapshot | |||
| ) |
Definition at line 302 of file ca_io_test.cc.
References out, Aleph::CA::JSON_Write_Options::pretty, Aleph::CA::JSON_Write_Options::rule, and Aleph::CA::write_json().
| TEST | ( | CAIO | , |
| Life105ParserMergesNegativeBlocks | |||
| ) |
| TEST | ( | CAIO | , |
| Life105RejectsCellsBeyondTheLargestCoordinate | |||
| ) |
Definition at line 418 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::CA::Binary_Cell_Pattern::origin_col, Aleph::CA::Binary_Cell_Pattern::origin_row, Aleph::CA::read_life_105(), Aleph::Array< T >::size(), Aleph::CA::try_read_life_105(), and Aleph::CA::Binary_Cell_Pattern::width.
| 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 | ( | CAIO | , |
| Life106NormalisesNegativeCoordinates | |||
| ) |
| TEST | ( | CAIO | , |
| Life106RejectsAnExtentThatDoesNotFit | |||
| ) |
Definition at line 389 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::CA::Binary_Cell_Pattern::height, Aleph::CA::Binary_Cell_Pattern::origin_col, Aleph::CA::read_life_106(), Aleph::Array< T >::size(), Aleph::CA::try_read_life_106(), and Aleph::CA::Binary_Cell_Pattern::width.
| TEST | ( | CAIO | , |
| Life106WriterProducesReadableCoordinates | |||
| ) |
Definition at line 228 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::CA::Binary_Cell_Pattern::height, out, Aleph::CA::read_life_106(), Aleph::CA::Binary_Cell_Pattern::width, and Aleph::CA::write_life_106().
| TEST | ( | CAIO | , |
| LoadBinaryPatternRejectsSizesThatWouldWrap | |||
| ) |
Definition at line 480 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::Array< T >::append(), Aleph::CA::Binary_Cell_Pattern::height, Aleph::CA::load_binary_pattern(), and Aleph::CA::Binary_Cell_Pattern::width.
| TEST | ( | CAIO | , |
| PgmBinaryOutputIsBitStable | |||
| ) |
Definition at line 360 of file ca_io_test.cc.
References out, and Aleph::CA::write_pgm().
| TEST | ( | CAIO | , |
| PlaintextParserAcceptsStarsAndRejectsUnknownGlyphs | |||
| ) |
Definition at line 203 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::CA::Binary_Cell_Pattern::height, Aleph::CA::read_plaintext_string(), and Aleph::CA::Binary_Cell_Pattern::width.
| TEST | ( | CAIO | , |
| PlaintextRoundTripPreservesFullFrame | |||
| ) |
Definition at line 187 of file ca_io_test.cc.
References Aleph::CA::Plaintext_Write_Options::comment, Aleph::CA::Binary_Cell_Pattern::height, Aleph::CA::read_plaintext_string(), Aleph::CA::Binary_Cell_Pattern::width, and Aleph::CA::write_plaintext_string().
| TEST | ( | CAIO | , |
| PpmBinaryOutputUsesCustomPalette | |||
| ) |
Definition at line 371 of file ca_io_test.cc.
References out, and Aleph::CA::write_ppm().
| TEST | ( | CAIO | , |
| RleFullFrameRoundTripPreservesExtentsAndCells | |||
| ) |
Definition at line 105 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::height, Aleph::CA::RLE_Write_Options::name, Aleph::CA::read_rle_string(), Aleph::CA::Binary_Cell_Pattern::rule, Aleph::CA::Binary_Cell_Pattern::width, and Aleph::CA::write_rle_string().
| TEST | ( | CAIO | , |
| RleParserAcceptsCommentsLongRunsAndConwayAliases | |||
| ) |
Definition at line 141 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::CA::Binary_Cell_Pattern::comments, Aleph::CA::Binary_Cell_Pattern::height, Aleph::CA::Binary_Cell_Pattern::name, Aleph::CA::read_rle_string(), Aleph::CA::Binary_Cell_Pattern::rule, Aleph::Array< T >::size(), and Aleph::CA::Binary_Cell_Pattern::width.
| TEST | ( | CAIO | , |
| RleParserBoundsTheNumberOfLiveCells | |||
| ) |
Definition at line 170 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, r, Aleph::CA::read_rle_string(), and Aleph::CA::try_read_rle_string().
| TEST | ( | CAIO | , |
| RleParserRejectsMalformedInput | |||
| ) |
Definition at line 158 of file ca_io_test.cc.
References Aleph::CA::read_rle_string().
| TEST | ( | CAIO | , |
| RleRunsThatWouldWrapAreRejected | |||
| ) |
Definition at line 451 of file ca_io_test.cc.
References Aleph::CA::Binary_Cell_Pattern::alive, Aleph::CA::Binary_Cell_Pattern::height, Aleph::CA::read_rle_string(), Aleph::Array< T >::size(), and Aleph::CA::Binary_Cell_Pattern::width.
| TEST | ( | CAIO | , |
| RleTrimmedOutputMatchesCanonicalGliderShape | |||
| ) |
Definition at line 125 of file ca_io_test.cc.
References Aleph::CA::read_rle_string(), Aleph::CA::RLE_Write_Options::trim_dead_border, and Aleph::CA::write_rle_string().