#include "gtest/gtest.h"

#include "Token.hpp"

class SemanticAnalyser
{
public:
  bool analyse(const Tokens& tokens)
  {
    return tokens.empty();
  }
};

using namespace ::testing;

struct SemanticAnalyserTest : public Test
{
  SemanticAnalyser analyser;
  static constexpr Token createTokenWithZeroValue(TokenType type)
  {
    return
    { type, 0};
  }
};

TEST_F(SemanticAnalyserTest, ShouldAcceptEmptyTokens)
{
  Tokens tokens{};
  ASSERT_TRUE(analyser.analyse(tokens));
}

TEST_F(SemanticAnalyserTest, ShouldNotAcceptInvalidInstructionSet)
{
  Tokens tokens{createTokenWithZeroValue(TokenType::Ld)};
  ASSERT_FALSE(analyser.analyse(tokens));
}
#include "gtest/gtest.h"

#include "Token.hpp"

class SemanticAnalyser
{
public:
  bool analyse(const Tokens& tokens)
  {
    return tokens.empty();
  }
};

constexpr Token createTokenWithZeroValue(TokenType type)
{
  return {type, 0};
}

TEST(SemanticAnalyserTest, ShouldAcceptEmptyTokens)
{
  SemanticAnalyser analyser;
  Tokens tokens{};
  ASSERT_TRUE(analyser.analyse(tokens));
}

TEST(SemanticAnalyserTest, ShouldNotAcceptInvalidInstructionSet)
{
  SemanticAnalyser analyser;
  Tokens tokens{createTokenWithZeroValue(TokenType::Ld)};
  ASSERT_FALSE(analyser.analyse(tokens));
}
--- 
+++ 
@@ -11,21 +11,26 @@
   }
 };
 
-constexpr Token createTokenWithZeroValue(TokenType type)
-{
-  return {type, 0};
-}
+using namespace ::testing;
 
-TEST(SemanticAnalyserTest, ShouldAcceptEmptyTokens)
+struct SemanticAnalyserTest : public Test
 {
   SemanticAnalyser analyser;
+  static constexpr Token createTokenWithZeroValue(TokenType type)
+  {
+    return
+    { type, 0};
+  }
+};
+
+TEST_F(SemanticAnalyserTest, ShouldAcceptEmptyTokens)
+{
   Tokens tokens{};
   ASSERT_TRUE(analyser.analyse(tokens));
 }
 
-TEST(SemanticAnalyserTest, ShouldNotAcceptInvalidInstructionSet)
+TEST_F(SemanticAnalyserTest, ShouldNotAcceptInvalidInstructionSet)
 {
-  SemanticAnalyser analyser;
   Tokens tokens{createTokenWithZeroValue(TokenType::Ld)};
   ASSERT_FALSE(analyser.analyse(tokens));
 }
Add test suite to Analyser
