diff options
author | Vlad Yaroslavlev <vladon@vladon.com> | 2022-02-10 16:46:25 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:25 +0300 |
commit | 344ea37b4a345701ab0e67de2266a1c1bd7baf2d (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/testing/gmock_in_unittest/example_ut/example_ut.cpp | |
parent | 706b83ed7de5a473436620367af31fc0ceecde07 (diff) | |
download | ydb-344ea37b4a345701ab0e67de2266a1c1bd7baf2d.tar.gz |
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 2 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 7174802c9f..97f19050e4 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); |