Now all of the old LevelManager code is gone. Next phase is to rename the Game:: to something better then test the shit out of it.

This commit is contained in:
Zed A. Shaw 2025-08-20 13:31:02 -04:00
parent a83ee77eea
commit c46927ea10
7 changed files with 91 additions and 126 deletions

View file

@ -20,7 +20,7 @@ std::shared_ptr<Map> make_map() {
return Game::current().map;
}
TEST_CASE("basic matrix iterator", "[matrix:basic]") {
TEST_CASE("basic matrix iterator", "[matrix]") {
std::ifstream infile("./tests/dijkstra.json");
json data = json::parse(infile);
auto test = data[0];
@ -107,7 +107,7 @@ TEST_CASE("thrash matrix iterators", "[matrix]") {
}
}
TEST_CASE("thrash box distance iterators", "[matrix:distance]") {
TEST_CASE("thrash box distance iterators", "[matrix]") {
size_t width = Random::uniform<size_t>(10, 21);
size_t height = Random::uniform<size_t>(10, 25);
@ -159,7 +159,7 @@ TEST_CASE("thrash box iterators", "[matrix]") {
}
}
TEST_CASE("thrash compass iterators", "[matrix:compass]") {
TEST_CASE("thrash compass iterators", "[matrix]") {
for(int count = 0; count < 5; count++) {
size_t width = Random::uniform<size_t>(1, 25);
size_t height = Random::uniform<size_t>(1, 33);
@ -189,7 +189,7 @@ TEST_CASE("thrash compass iterators", "[matrix:compass]") {
}
}
TEST_CASE("prototype line algorithm", "[matrix:line]") {
TEST_CASE("prototype line algorithm", "[matrix]") {
size_t width = Random::uniform<size_t>(10, 12);
size_t height = Random::uniform<size_t>(10, 15);
Map map(width,height);
@ -225,7 +225,7 @@ TEST_CASE("prototype line algorithm", "[matrix:line]") {
}
}
TEST_CASE("prototype circle algorithm", "[matrix:circle]") {
TEST_CASE("prototype circle algorithm", "[matrix]") {
for(int count = 0; count < 5; count++) {
size_t width = Random::uniform<size_t>(10, 13);
size_t height = Random::uniform<size_t>(10, 15);
@ -256,8 +256,10 @@ TEST_CASE("prototype circle algorithm", "[matrix:circle]") {
}
}
TEST_CASE("viewport iterator", "[matrix:viewport]") {
TEST_CASE("viewport iterator", "[matrix]") {
components::init();
textures::init();
Game::init();
size_t width = Random::uniform<size_t>(20, 22);
size_t height = Random::uniform<size_t>(21, 25);
shared_ptr<Map> map = make_map();
@ -280,7 +282,7 @@ TEST_CASE("viewport iterator", "[matrix:viewport]") {
}
}
TEST_CASE("random rectangle", "[matrix:rando_rect]") {
TEST_CASE("random rectangle", "[matrix]") {
components::init();
for(int i = 0; i < 5; i++) {
shared_ptr<Map> map = make_map();
@ -305,7 +307,7 @@ TEST_CASE("random rectangle", "[matrix:rando_rect]") {
}
}
TEST_CASE("standard rectangle", "[matrix:rectangle]") {
TEST_CASE("standard rectangle", "[matrix]") {
components::init();
for(int i = 0; i < 5; i++) {
shared_ptr<Map> map = make_map();