mer i testfil, fungerar ej:
authormalak585 <malak585@tlvm-4-2-1.ad.liu.se>
Fri, 8 Dec 2023 10:50:53 +0000 (11:50 +0100)
committermalak585 <malak585@tlvm-4-2-1.ad.liu.se>
Fri, 8 Dec 2023 10:50:53 +0000 (11:50 +0100)
src/_test.cc

index 4fed3a6ab36c4b0c94c0dbf7ebf818b0373260c4..2f68f3a70e0dbc04be8854cc2adee1a9fb2e3443 100644 (file)
@@ -4,23 +4,40 @@
  * All testkod bör köras från denna fil och denna fil enbart.
  */
 #include <fstream>
+#include <memory>
+#include <iostream>
+#include <SFML/Graphics.hpp>
 
-#include <SFML/Graphics.hpp> // 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<Start_menu>(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<Start_menu>(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