<commit_before>#include "gtest/gtest.h"
#include "entity/managers/AttributeManager.h"

TEST(AttributeManagerTest, AttributeManagerIsCorrectType)
{
	AttributeManager am;

	EXPECT_EQ(Attribute, am.getComponentType());
}

TEST(AttributeManagerTest, EntityDoesNotHaveComponent)
{
	AttributeManager am;
	Entity e = 5;

	EXPECT_FALSE(am.entityHasComponent(e));
}

TEST(AttributeManagerTest, AddedEntityHasComponent)
{
	AttributeManager am;
	Entity e = 5;

	am.addComponent(e);

	EXPECT_TRUE(am.entityHasComponent(e));
}

TEST(AttributeManagerTest, RemoveComponent)
{
	AttributeManager am;
	Entity e = 5;

	am.addComponent(e);

	ASSERT_TRUE(am.entityHasComponent(e));

	//am.removeComponent(e);

	//EXPECT_FALSE(am.entityHasComponent(e));
}

TEST(AttributeManagerTest, AttributeDefaultsToNULL)
{
	AttributeManager am;
	Entity e = 5;

	am.addComponent(e);

	EXPECT_EQ(am.getNullComponent().size(), am.getComponent(e).size());
}

TEST(AttributeManagerTest, SetAttribute)
{
	AttributeManager am;
	Entity e = 5;
	AttributeComponent strength = {1,2};
	AttributeComponent intelligence = {1,2};

	am.setComponent(e, Str, strength);
	am.setComponent(e, Int, intelligence);

	EXPECT_EQ(strength.max, am.getComponent(e, Str).max);
	EXPECT_EQ(strength.cur, am.getComponent(e, Str).cur);

	EXPECT_EQ(intelligence.max, am.getComponent(e, Int).max);
	EXPECT_EQ(intelligence.cur, am.getComponent(e, Int).cur);<commit_msg>SetAttribute test upated to prove uniqueness<commit_after>#include "gtest/gtest.h"
#include "entity/managers/AttributeManager.h"

TEST(AttributeManagerTest, AttributeManagerIsCorrectType)
{
	AttributeManager am;

	EXPECT_EQ(Attribute, am.getComponentType());
}

TEST(AttributeManagerTest, EntityDoesNotHaveComponent)
{
	AttributeManager am;
	Entity e = 5;

	EXPECT_FALSE(am.entityHasComponent(e));
}

TEST(AttributeManagerTest, AddedEntityHasComponent)
{
	AttributeManager am;
	Entity e = 5;

	am.addComponent(e);

	EXPECT_TRUE(am.entityHasComponent(e));
}

TEST(AttributeManagerTest, RemoveComponent)
{
	AttributeManager am;
	Entity e = 5;

	am.addComponent(e);

	ASSERT_TRUE(am.entityHasComponent(e));

	//am.removeComponent(e);

	//EXPECT_FALSE(am.entityHasComponent(e));
}

TEST(AttributeManagerTest, AttributeDefaultsToNULL)
{
	AttributeManager am;
	Entity e = 5;

	am.addComponent(e);

	EXPECT_EQ(am.getNullComponent().size(), am.getComponent(e).size());
}

TEST(AttributeManagerTest, SetAttribute)
{
	AttributeManager am;
	Entity e = 5;
	AttributeComponent strength = {1,2};
	AttributeComponent intelligence = {5,4};

	am.setComponent(e, Str, strength);
	am.setComponent(e, Int, intelligence);

	EXPECT_EQ(strength.max, am.getComponent(e, Str).max);
	EXPECT_EQ(strength.cur, am.getComponent(e, Str).cur);

	EXPECT_EQ(intelligence.max, am.getComponent(e, Int).max);
	EXPECT_EQ(intelligence.cur, am.getComponent(e, Int).cur);
{'fraction_non_alphanumeric': 0.13290915517850832, 'fraction_numerical': 0.006362672322375398, 'mean_word_length': 6.73224043715847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5891572', 'n_tokens_mistral': 989, 'n_tokens_neox': 955, 'n_words': 162}