57 lines
1.1 KiB
C++
57 lines
1.1 KiB
C++
#include <catch2/catch_all.hpp>
|
|
|
|
#include "algorithms/AldousBroder.h"
|
|
#include "algorithms/BinaryTree.h"
|
|
#include "algorithms/Sidewinder.h"
|
|
#include "algorithms/HuntAndKill.h"
|
|
#include "algorithms/Wilsons.h"
|
|
#include "algorithms/RecursiveBacktracker.h"
|
|
|
|
#include "Grid.h"
|
|
|
|
TEST_CASE("Sample Test", "[example]") {
|
|
REQUIRE(1 + 1 == 2);
|
|
}
|
|
|
|
TEST_CASE("Sample Test2", "[.][example]") {
|
|
REQUIRE(1 + 2 == 2);
|
|
}
|
|
|
|
TEST_CASE("Maze Generation Benchmarks") {
|
|
BENCHMARK("AldousBroder") {
|
|
Grid grid(20, 20);
|
|
AldousBroder::on(grid);
|
|
return grid;
|
|
};
|
|
|
|
BENCHMARK("BinaryTree") {
|
|
Grid grid(20, 20);
|
|
BinaryTree::on(grid);
|
|
return grid;
|
|
};
|
|
|
|
BENCHMARK("Sidewinder") {
|
|
Grid grid(20, 20);
|
|
Sidewinder::on(grid);
|
|
return grid;
|
|
};
|
|
|
|
BENCHMARK("HuntAndKill") {
|
|
Grid grid(20, 20);
|
|
HuntAndKill::on(grid);
|
|
return grid;
|
|
};
|
|
|
|
BENCHMARK("Wilsons") {
|
|
Grid grid(20, 20);
|
|
Wilsons::on(grid);
|
|
return grid;
|
|
};
|
|
|
|
BENCHMARK("RecursiveBacktracker") {
|
|
Grid grid(20, 20);
|
|
RecursiveBacktracker::on(grid);
|
|
return grid;
|
|
};
|
|
};
|