ramverk testfil fungerar: Lukas Alma Malin Stina Nils Arvid
authorLukel495 <lukas.eliasson@live.se>
Fri, 8 Dec 2023 11:04:12 +0000 (12:04 +0100)
committerLukel495 <lukas.eliasson@live.se>
Fri, 8 Dec 2023 11:04:12 +0000 (12:04 +0100)
src/_test.cc

index 2f68f3a70e0dbc04be8854cc2adee1a9fb2e3443..4ed1579ba543e80b7989d70febfdae774da810a6 100644 (file)
@@ -3,30 +3,25 @@
  *
  * All testkod bör köras från denna fil och denna fil enbart.
  */
+#define CATCH_CONFIG_MAIN
+#include "catch.hpp"
+
 #include <fstream>
 #include <memory>
 #include <iostream>
 #include <SFML/Graphics.hpp>
 
-#include "catch.hpp"
 #include "States.h"
 #include "json.hpp"
 #include "constants.h"
 #include "Context.h"
 
-
 using json = nlohmann::json;
 
-int main()
+TEST_CASE("functions")
 {
-        return 0;
-}
-    TEST_CASE("functions")
-    { 
-    
-        SECTION("Start_menu")
-        {
-        
+    SECTION("Start_menu")
+    {
         Context game_context{};
 
         std::ifstream f("assets/data.json");
@@ -34,10 +29,8 @@ int main()
         game_context.current_state = std::make_unique<Start_menu>(data);
 
         std::cout << "banenrr" << std::endl;
-        
-        }
-
     }
+}
 
     /*
     SECTION("Default")