IN101 project on Conway's Game of Life
Functions | Variables
test-list-conway.c File Reference

Test executable source code for a linked list implementation of Conway's game of life universe simulator. More...

#include <assert.h>
#include "list_conway.h"
#include "list_loader.h"
Include dependency graph for test-list-conway.c:

Functions

void test_list_countneighbors ()
 Test of the list_count_neighbors function. More...
 
bool compare_linked_lists (linked_list a, linked_list b)
 Determine whether two linked lists are identical, comparing all cells. More...
 
void test_list_step ()
 Test of the list_step function. More...
 
int main (void)
 

Variables

char * filename = "data/glider.txt"
 

Detailed Description

Test executable source code for a linked list implementation of Conway's game of life universe simulator.

Author
Victor Colomb (vic.c.nosp@m.ol@h.nosp@m.otmai.nosp@m.l.fr)
Date
2021-03-16

Function Documentation

◆ compare_linked_lists()

bool compare_linked_lists ( linked_list  a,
linked_list  b 
)

Determine whether two linked lists are identical, comparing all cells.

Parameters
afirst linked list
bsecond linked list
Returns
true if the lists are identical, false otherwise

◆ test_list_countneighbors()

void test_list_countneighbors ( )

Test of the list_count_neighbors function.

This tests uses the data/glider.txt source file and checks several neighbor counts.

◆ test_list_step()

void test_list_step ( )

Test of the list_step function.

This test uses the data/archive-test directory that contains 512 source files and their next step solution.
It will load each universe from each file, use the list_step function and compare the return's cell table with the given exact solution.