From 8ffb221d5a92b627f28861a59ab92dab6e9fdc29 Mon Sep 17 00:00:00 2001 From: Arian Rezazadeh Date: Mon, 22 Aug 2022 11:13:38 +0430 Subject: [PATCH] fix test file constants name case --- test/test.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/test.cpp b/test/test.cpp index 0dd33e6..a13e753 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -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: @@ -28,25 +28,25 @@ class ClipboardTest : public testing::Test { TEST_F(ClipboardTest, RandomGeneratorGenerateDisplayableTextFiveSamplesMustBeDifferent) { std::vector 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> 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); } @@ -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); }