|
MP7
Mazes
|
#include "catch.hpp"#include <iostream>#include <fstream>#include <sstream>#include <string>#include <stack>#include "../cs225/PNG.h"#include "../dsets.h"#include "../maze.h"#include "mazereader.h"
Include dependency graph for test_part2.cpp:Macros | |
| #define | GENERATE_SOLUTIONS 0 |
| #define | READ_SOLUTION_PNG(func, width, height) read_solution(string("tests/soln_") + func + string(".png"), width, height) |
| #define | READ_UNSOLVED_PNG(func, width, height) read_unsolved(string("tests/soln_") + func + string(".png"), width, height) |
| #define | READ_SOLUTION_MAZE(func, width, height) MazeReader(READ_SOLUTION_PNG(func, width, height)) |
| #define | READ_UNSOLVED_MAZE(func, widht, height) MazeReader(READ_UNSOLVED_PNG(func, width, height)) |
Functions | |
| void | assert_maze_acyclic (SquareMaze &maze, int width, int height) |
| void | assert_maze_connected (SquareMaze &maze, int width, int height) |
| void | assert_maze_tree (SquareMaze &maze, int width, int height) |
| void | copyMaze (const MazeReader &source, SquareMaze *dest) |
| void | advancePosition (int *x, int *y, int dir) |
| PNG | read_solution (const string &filename, int width, int height) |
| PNG | read_unsolved (const string &filename, int width, int height) |
| void | recDFS (SquareMaze &maze, vector< vector< uint8_t > > *visited, int x, int y, int width, int height, int *calls) |
| pair< int, int > | assert_maze_helper (SquareMaze &maze, int width, int height) |
| TEST_CASE ("testMakeSmallMaze","[weight=10][part2]") | |
| TEST_CASE ("testMakeMazeConnected","[weight=10][part2]") | |
| TEST_CASE ("testMakeMazeAcyclic","[weight=10][part2]") | |
| TEST_CASE ("testMakeMazeTree1000","[weight=10][part2]") | |
| TEST_CASE ("testMakeMazeRandom","[weight=10][part2]") | |
| TEST_CASE ("testSolveMazeValidPath","[weight=10][part2]") | |
| TEST_CASE ("testSolutionBottomRow","[weight=10][part2]") | |
| TEST_CASE ("testSolutionCorrectSquare","[weight=10][part2]") | |
| void | helpSolveMaze (const MazeReader &soln) |
| TEST_CASE ("testSolveMazeSmall","[weight=10][part2]") | |
| TEST_CASE ("testSolveMazeLarge","[weight=10][part2]") | |
| TEST_CASE ("testDrawMazeSmall","[weight=10][part2]") | |
| TEST_CASE ("testDrawMazeMed","[weight=10][part2]") | |
| TEST_CASE ("testDrawMazeLarge","[weight=10][part2]") | |
| TEST_CASE ("testDrawSolutionMed","[weight=10][part2]") | |
| TEST_CASE ("testDrawSolutionLarge","[weight=10][part2]") | |
| #define GENERATE_SOLUTIONS 0 |
| #define READ_SOLUTION_PNG | ( | func, | |
| width, | |||
| height | |||
| ) | read_solution(string("tests/soln_") + func + string(".png"), width, height) |
| #define READ_UNSOLVED_PNG | ( | func, | |
| width, | |||
| height | |||
| ) | read_unsolved(string("tests/soln_") + func + string(".png"), width, height) |
| #define READ_SOLUTION_MAZE | ( | func, | |
| width, | |||
| height | |||
| ) | MazeReader(READ_SOLUTION_PNG(func, width, height)) |
| #define READ_UNSOLVED_MAZE | ( | func, | |
| widht, | |||
| height | |||
| ) | MazeReader(READ_UNSOLVED_PNG(func, width, height)) |
| void assert_maze_acyclic | ( | SquareMaze & | maze, |
| int | width, | ||
| int | height | ||
| ) |
| void assert_maze_connected | ( | SquareMaze & | maze, |
| int | width, | ||
| int | height | ||
| ) |
| void assert_maze_tree | ( | SquareMaze & | maze, |
| int | width, | ||
| int | height | ||
| ) |
| void copyMaze | ( | const MazeReader & | source, |
| SquareMaze * | dest | ||
| ) |
| void advancePosition | ( | int * | x, |
| int * | y, | ||
| int | dir | ||
| ) |
| void recDFS | ( | SquareMaze & | maze, |
| vector< vector< uint8_t > > * | visited, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int * | calls | ||
| ) |
| pair<int, int> assert_maze_helper | ( | SquareMaze & | maze, |
| int | width, | ||
| int | height | ||
| ) |
| TEST_CASE | ( | "testMakeSmallMaze" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testMakeMazeConnected" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testMakeMazeAcyclic" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testMakeMazeTree1000" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testMakeMazeRandom" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testSolveMazeValidPath" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testSolutionBottomRow" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testSolutionCorrectSquare" | , |
| "" | [weight=10][part2] | ||
| ) |
| void helpSolveMaze | ( | const MazeReader & | soln | ) |
| TEST_CASE | ( | "testSolveMazeSmall" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testSolveMazeLarge" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testDrawMazeSmall" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testDrawMazeMed" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testDrawMazeLarge" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testDrawSolutionMed" | , |
| "" | [weight=10][part2] | ||
| ) |
| TEST_CASE | ( | "testDrawSolutionLarge" | , |
| "" | [weight=10][part2] | ||
| ) |