From 0b8075399c5e0b0c4179095bdc1f8126d539ff72 Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 15 Jun 2025 13:27:09 +0200 Subject: [PATCH] add test survive 3 --- lab11/game_of_life/test.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lab11/game_of_life/test.cpp b/lab11/game_of_life/test.cpp index 589f494..59907e6 100644 --- a/lab11/game_of_life/test.cpp +++ b/lab11/game_of_life/test.cpp @@ -16,7 +16,7 @@ TEST(test_underpopulation) { check(end(0, 0), 0); } -TEST(test_survive) { +TEST(test_survive_2) { Matrix start = Matrix::zeros(10); start(0, 0) = 1; start(0, 1) = 1; @@ -25,6 +25,16 @@ TEST(test_survive) { check(end(0, 0), 1); } +TEST(test_survive_3) { + Matrix start = Matrix::zeros(10); + start(0, 0) = 1; + start(1, 1) = 1; + start(0, 1) = 1; + start(1, 0) = 1; + Matrix end = init_step(start); + check(end(0, 0), 1); +} + TEST(test_overpopulation) { Matrix start = Matrix::zeros(10); start(1, 1) = 1;