diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:23 +0300 |
commit | 706b83ed7de5a473436620367af31fc0ceecde07 (patch) | |
tree | 103305d30dec77e8f6367753367f59b3cd68f9f1 /library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp | |
parent | 918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff) | |
download | ydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp')
-rw-r--r-- | library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp b/library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp index 97f19050e4..7174802c9f 100644 --- a/library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp +++ b/library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp @@ -2,7 +2,7 @@ #include <library/cpp/testing/unittest/registar.h> -#include <util/generic/string.h> +#include <util/generic/string.h> // Set this variable to true if you want to see failures ///////////////////////////////////////////////////////// @@ -16,7 +16,7 @@ public: virtual void Func1() = 0; - virtual int Func2(const TString&) const = 0; + virtual int Func2(const TString&) const = 0; }; class TTestMock: public ITestIface { @@ -50,11 +50,11 @@ Y_UNIT_TEST_SUITE(TExampleGMockTest) { Y_UNIT_TEST(TReturnValuesTest) { TTestMock mock; - EXPECT_CALL(mock, Func2(TString("1"))) + EXPECT_CALL(mock, Func2(TString("1"))) .WillOnce(Return(1)) .WillRepeatedly(Return(42)); - EXPECT_CALL(mock, Func2(TString("hello"))) + EXPECT_CALL(mock, Func2(TString("hello"))) .WillOnce(Return(-1)); UNIT_ASSERT_VALUES_EQUAL(mock.Func2("hello"), -1); |