Skip to content

Commit

Permalink
fix test file constants name case
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian8j2 committed Aug 22, 2022
1 parent c09cfc5 commit 8ffb221
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

#include "utils.hpp"

constexpr size_t SMALL_TEXT_SIZE = 100;
constexpr size_t LARGE_TEXT_SIZE = 10000;
constexpr size_t kSmallTextSize = 100;
constexpr size_t kLargeTextSize = 10000;

class ClipboardTest : public testing::Test {
protected:
Expand All @@ -28,25 +28,25 @@ class ClipboardTest : public testing::Test {
TEST_F(ClipboardTest, RandomGeneratorGenerateDisplayableTextFiveSamplesMustBeDifferent) {
std::vector<std::string> samples(5);
std::generate(samples.begin(), samples.end(),
std::bind(&RandomGenerator::generate_random_displayable_text, m_random_generator, SMALL_TEXT_SIZE));
std::bind(&RandomGenerator::generate_random_displayable_text, m_random_generator, kSmallTextSize));
expect_no_duplicate_item(samples);
}

TEST_F(ClipboardTest, RandomGeneratorGenerateBytesFiveSamplesMustBeDifferent) {
std::vector<std::vector<uint8_t>> samples(5);
std::generate(samples.begin(), samples.end(),
std::bind(&RandomGenerator::generate_random_bytes, m_random_generator, SMALL_TEXT_SIZE));
std::bind(&RandomGenerator::generate_random_bytes, m_random_generator, kSmallTextSize));
expect_no_duplicate_item(samples);
}

TEST_F(ClipboardTest, CopyPasteSmallText) {
const std::string random_text = m_random_generator.generate_random_displayable_text(SMALL_TEXT_SIZE);
const std::string random_text = m_random_generator.generate_random_displayable_text(kSmallTextSize);
m_clipboard.copy(random_text);
expect_clipboard_data(random_text);
}

TEST_F(ClipboardTest, CopyPasteLargeText) {
const std::string random_text = m_random_generator.generate_random_displayable_text(LARGE_TEXT_SIZE);
const std::string random_text = m_random_generator.generate_random_displayable_text(kLargeTextSize);
m_clipboard.copy(random_text);
expect_clipboard_data(random_text);
}
Expand All @@ -61,7 +61,7 @@ TEST_F(ClipboardTest, CopyPasteWithOperatorOverload) {
}

TEST_F(ClipboardTest, PasteWhenYouAreClipboardOwner) {
const std::string random_text = m_random_generator.generate_random_displayable_text(SMALL_TEXT_SIZE);
const std::string random_text = m_random_generator.generate_random_displayable_text(kSmallTextSize);
m_clipboard.copy(random_text);
EXPECT_EQ(m_clipboard.paste(), random_text);
}
Expand Down

0 comments on commit 8ffb221

Please sign in to comment.