<commit_before>#include "gtest/gtest.h"
#include "actor/Attribute.h"

TEST(AttributeTest, DefaultsToTen)
{
	Attribute a1;

	EXPECT_EQ(10, a1.getMaxAttr());
}

TEST(AttributeTest, SetInitialAttribute)
{
	Attribute a1(15);

	EXPECT_EQ(15, a1.getMaxAttr());
	EXPECT_EQ(15, a1.getCurAttr());
}

TEST(AttributeTest, InitialCurrentEqualToMax)
{
	Attribute a1;

	EXPECT_EQ(a1.getMaxAttr(), a1.getCurAttr());
}

TEST(AttributeTest, ChangeMax)
{
	Attribute a1;
	a1.setMaxAttr(15);

	EXPECT_EQ(15, a1.getMaxAttr());
}

TEST(AttributeTest, ChangeCurrent)
{
	Attribute a1;
	a1.setCurAttr(5);

	EXPECT_EQ(5, a1.getCurAttr());
}
<commit_msg>Test case for Attribute::getCurRatio().<commit_after>#include "gtest/gtest.h"
#include "actor/Attribute.h"

TEST(AttributeTest, DefaultsToTen)
{
	Attribute a1;

	EXPECT_EQ(10, a1.getMaxAttr());
}

TEST(AttributeTest, SetInitialAttribute)
{
	Attribute a1(15);

	EXPECT_EQ(15, a1.getMaxAttr());
	EXPECT_EQ(15, a1.getCurAttr());
}

TEST(AttributeTest, InitialCurrentEqualToMax)
{
	Attribute a1;

	EXPECT_EQ(a1.getMaxAttr(), a1.getCurAttr());
}

TEST(AttributeTest, ChangeMax)
{
	Attribute a1;
	a1.setMaxAttr(15);

	EXPECT_EQ(15, a1.getMaxAttr());
}

TEST(AttributeTest, ChangeCurrent)
{
	Attribute a1;
	a1.setCurAttr(5);

	EXPECT_EQ(5, a1.getCurAttr());
}

TEST(AttributeTest, GetCorrectRatio)
{
	Attribute a1;

	a1.setMaxAttr(10);
	a1.setCurAttr(5);

	EXPECT_FLOAT_EQ(0.5, a1.getCurRatio());
}

{'fraction_non_alphanumeric': 0.15715292459478505, 'fraction_numerical': 0.04580690627202255, 'mean_word_length': 6.319587628865979, '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': '5873362', 'n_tokens_mistral': 605, 'n_tokens_neox': 593, 'n_words': 87}