diff options
author | artkolesnikov <[email protected]> | 2022-02-10 16:47:37 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:47:37 +0300 |
commit | 0d7c4ef9025d79c9bba6f62a92b490ee72e80ed0 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /util/stream/str_ut.cpp | |
parent | 8611780b719073fe6c7e6536c71d61e20d57a5d6 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/stream/str_ut.cpp')
-rw-r--r-- | util/stream/str_ut.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/util/stream/str_ut.cpp b/util/stream/str_ut.cpp index 33a70a7eab4..fc6b46c31a4 100644 --- a/util/stream/str_ut.cpp +++ b/util/stream/str_ut.cpp @@ -1,41 +1,41 @@ -#include "str.h" - +#include "str.h" + #include <library/cpp/testing/unittest/registar.h> -#include <util/generic/typetraits.h> - -template <typename T> -const T ReturnConstTemp(); - +#include <util/generic/typetraits.h> + +template <typename T> +const T ReturnConstTemp(); + Y_UNIT_TEST_SUITE(TStringInputOutputTest) { Y_UNIT_TEST(Lvalue) { TString str = "Hello, World!"; - TStringInput input(str); - + TStringInput input(str); + TString result = input.ReadAll(); - + UNIT_ASSERT_VALUES_EQUAL(result, str); - } - + } + Y_UNIT_TEST(ConstRef) { TString str = "Hello, World!"; const TString& r = str; - TStringInput input(r); - + TStringInput input(r); + TString result = input.ReadAll(); - + UNIT_ASSERT_VALUES_EQUAL(result, str); - } - + } + Y_UNIT_TEST(NonConstRef) { TString str = "Hello, World!"; TString& r = str; - TStringInput input(r); - + TStringInput input(r); + TString result = input.ReadAll(); - + UNIT_ASSERT_VALUES_EQUAL(result, str); - } - + } + Y_UNIT_TEST(Transfer) { TString inputString = "some_string"; TStringInput input(inputString); @@ -149,4 +149,4 @@ Y_UNIT_TEST_SUITE(TStringInputOutputTest) { // Check old stream is in a valid state output1 << "baz"; } -} +} |