41#include <gtest/gtest.h>
68 std::istringstream
in(
"x = 3, y = 1, rule = B3/S23\n3o!\n");
85 std::istringstream ok(
"!Blinker\nOOO\n");
87 ASSERT_TRUE(a.has_value()) << (a.has_value() ?
"" : a.error());
90 std::istringstream
bad(
"!Comment\nO@O\n");
100 std::istringstream ok(
"#Life 1.05\n#P 0 0\n***\n");
102 ASSERT_TRUE(a.has_value()) << (a.has_value() ?
"" : a.error());
105 std::istringstream
bad(
"garbage without a header\n");
113 std::istringstream ok(
"#Life 1.06\n0 0\n1 0\n2 0\n");
115 ASSERT_TRUE(a.has_value()) << (a.has_value() ?
"" : a.error());
118 std::istringstream
bad(
"#Life 1.06\nnot two integers\n");
141 std::istringstream ok(
"0,1,0\n0,1,0\n0,1,0\n");
143 ASSERT_TRUE(a.has_value()) << (a.has_value() ?
"" : a.error());
147 std::istringstream
ragged(
"0,1,0\n1,1\n");
155 std::istringstream empty(
"");
173 std::istringstream
bad_life106(
"#Life 1.06\nnot two integers\n");
176 std::istringstream
bad_csv(
"1,2,3\n1,2\n");
File-format readers and writers for cellular-automata frames.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
expected< Binary_Cell_Pattern, std::string > try_read_life_106(std::istream &in)
Non-throwing variant of read_life_106.
expected< Binary_Cell_Pattern, std::string > try_read_plaintext(std::istream &in)
Non-throwing variant of read_plaintext.
Binary_Cell_Pattern read_life_105(std::istream &in)
Read a Life 1.05 pattern.
RLE_Pattern read_rle_string(const std::string &s)
Read a Conway RLE pattern from a string.
Binary_Cell_Pattern read_life_106(std::istream &in)
Read a Life 1.06 pattern.
Binary_Cell_Pattern read_plaintext(std::istream &in)
Read a Life plaintext (.cells) pattern.
expected< RLE_Pattern, std::string > try_read_rle_string(const std::string &s)
Non-throwing variant of read_rle_string.
expected< RLE_Pattern, std::string > try_read_rle(std::istream &in)
Non-throwing variant of read_rle.
expected< Binary_Cell_Pattern, std::string > try_read_life_105(std::istream &in)
Non-throwing variant of read_life_105.
Main namespace for Aleph-w library functions.