From ae0da3765826e88e427677218948e4eac068f5b8 Mon Sep 17 00:00:00 2001 From: malak585 Date: Fri, 8 Dec 2023 11:50:53 +0100 Subject: [PATCH] mer i testfil, fungerar ej: --- src/_test.cc | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/_test.cc b/src/_test.cc index 4fed3a6..2f68f3a 100644 --- a/src/_test.cc +++ b/src/_test.cc @@ -4,23 +4,40 @@ * All testkod bör köras från denna fil och denna fil enbart. */ #include +#include +#include +#include -#include // includes most things in SFML #include "catch.hpp" -#include "states.h" +#include "States.h" #include "json.hpp" +#include "constants.h" +#include "Context.h" + using json = nlohmann::json; -TEST_CASE("functions") -{ - SECTION("Start_menu") - { - std::ifstream f("assets/data.json"); - json data = json::parse(f); - CHECK(std::make_unique(data)); - } +int main() +{ + return 0; +} + TEST_CASE("functions") + { + + SECTION("Start_menu") + { + + Context game_context{}; + std::ifstream f("assets/data.json"); + json data = json::parse(f); + game_context.current_state = std::make_unique(data); + + std::cout << "banenrr" << std::endl; + + } + + } /* SECTION("Default") @@ -70,4 +87,3 @@ TEST_CASE("functions") CHECK(empty.to_string() == "[5]"); }*/ -} \ No newline at end of file -- 2.30.2