diff options
author | Ilnur Khuziev <ilnur.khuziev@yandex.ru> | 2022-02-10 16:46:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:14 +0300 |
commit | 60040c91ffe701a84689b2c6310ff845e65cff42 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/cpp/testing | |
parent | 736dcd8ca259457a136f2f9f9168c44643914323 (diff) | |
download | ydb-60040c91ffe701a84689b2c6310ff845e65cff42.tar.gz |
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing')
24 files changed, 45 insertions, 45 deletions
diff --git a/library/cpp/testing/README.md b/library/cpp/testing/README.md index 8980ccfd0a..e8e0391be4 100644 --- a/library/cpp/testing/README.md +++ b/library/cpp/testing/README.md @@ -12,5 +12,5 @@ * `gtest_protobuf` — утилиты для работы с протобуфом в тестах. * `hook` — хуки для выполнения пользовательских функций в тестах и бенчмарках. * `mock_server` — реализация http-сервера для тестов. -* `unittest` — реализация модуля UNITTEST — основного средства для тестирования тестов на С++ в Аркадии. -* `unittest_main` — реализация `int main(argc, argv)` для модуля UNITTEST (она вынесена в отдельную библиотеку, чтобы оставить возможность для реализации `UNITTEST_WITH_CUSTOM_ENTRY_POINT` и `YT_UNITTEST`. +* `unittest` — реализация модуля UNITTEST — основного средства для тестирования тестов на С++ в Аркадии. +* `unittest_main` — реализация `int main(argc, argv)` для модуля UNITTEST (она вынесена в отдельную библиотеку, чтобы оставить возможность для реализации `UNITTEST_WITH_CUSTOM_ENTRY_POINT` и `YT_UNITTEST`. diff --git a/library/cpp/testing/benchmark/bench.cpp b/library/cpp/testing/benchmark/bench.cpp index f8cb2c01f9..08d8708005 100644 --- a/library/cpp/testing/benchmark/bench.cpp +++ b/library/cpp/testing/benchmark/bench.cpp @@ -3,10 +3,10 @@ #include <contrib/libs/re2/re2/re2.h> #include <library/cpp/colorizer/output.h> -#include <library/cpp/getopt/small/last_getopt.h> +#include <library/cpp/getopt/small/last_getopt.h> #include <library/cpp/json/json_value.h> #include <library/cpp/linear_regression/linear_regression.h> -#include <library/cpp/threading/poor_man_openmp/thread_helper.h> +#include <library/cpp/threading/poor_man_openmp/thread_helper.h> #include <util/system/hp_timer.h> #include <util/system/info.h> @@ -22,7 +22,7 @@ #include <util/generic/maybe.h> #include <util/generic/strbuf.h> #include <util/generic/intrlist.h> -#include <util/stream/format.h> +#include <util/stream/format.h> #include <util/system/yield.h> using re2::RE2; @@ -128,11 +128,11 @@ namespace { } TString hr; - if (t > 10 * 1000) { - hr = " (" + ToString(HumanReadableSize(t, ESizeFormat::SF_QUANTITY)) + ")"; - } - - return ToString(t) + hr + " cycles"; + if (t > 10 * 1000) { + hr = " (" + ToString(HumanReadableSize(t, ESizeFormat::SF_QUANTITY)) + ")"; + } + + return ToString(t) + hr + " cycles"; } const ui64 N = GetCycleCount(); @@ -312,7 +312,7 @@ namespace { class TCSVReporter: public IReporter { public: TCSVReporter() { - Cout << "Name\tSamples\tIterations\tRun_time\tPer_iteration_sec\tPer_iteration_cycles" << Endl; + Cout << "Name\tSamples\tIterations\tRun_time\tPer_iteration_sec\tPer_iteration_cycles" << Endl; } ~TCSVReporter() override { @@ -469,7 +469,7 @@ void Out<TResult>(IOutputStream& out, const TResult& r) { out << "----------- " << LightRed() << r.TestName << Old() << " ---------------" << Endl << " samples: " << White() << r.Samples << Old() << Endl << " iterations: " << White() << r.Iterations << Old() << Endl - << " iterations hr: " << White() << HumanReadableSize(r.Iterations, SF_QUANTITY) << Old() << Endl + << " iterations hr: " << White() << HumanReadableSize(r.Iterations, SF_QUANTITY) << Old() << Endl << " run time: " << White() << r.RunTime << Old() << Endl; if (r.CyclesPerIteration) { diff --git a/library/cpp/testing/benchmark/examples/main.cpp b/library/cpp/testing/benchmark/examples/main.cpp index 03cb856b85..ddd8b05ffc 100644 --- a/library/cpp/testing/benchmark/examples/main.cpp +++ b/library/cpp/testing/benchmark/examples/main.cpp @@ -1,4 +1,4 @@ -#include <library/cpp/testing/benchmark/bench.h> +#include <library/cpp/testing/benchmark/bench.h> #include <util/generic/xrange.h> #include <util/generic/algorithm.h> diff --git a/library/cpp/testing/benchmark/examples/metrics/main.py b/library/cpp/testing/benchmark/examples/metrics/main.py index 11ab1c2cd1..8f9d9d06ae 100644 --- a/library/cpp/testing/benchmark/examples/metrics/main.py +++ b/library/cpp/testing/benchmark/examples/metrics/main.py @@ -3,5 +3,5 @@ import yatest.common as yc def test_export_metrics(metrics): metrics.set_benchmark(yc.execute_benchmark( - 'library/cpp/testing/benchmark/examples/examples', + 'library/cpp/testing/benchmark/examples/examples', threads=8)) diff --git a/library/cpp/testing/benchmark/examples/metrics/ya.make b/library/cpp/testing/benchmark/examples/metrics/ya.make index d6767e9c33..a9dbdca9fa 100644 --- a/library/cpp/testing/benchmark/examples/metrics/ya.make +++ b/library/cpp/testing/benchmark/examples/metrics/ya.make @@ -15,6 +15,6 @@ TAG( TEST_SRCS(main.py) -DEPENDS(library/cpp/testing/benchmark/examples) +DEPENDS(library/cpp/testing/benchmark/examples) END() diff --git a/library/cpp/testing/benchmark/main/main.cpp b/library/cpp/testing/benchmark/main/main.cpp index 264a1de8e5..aabcb89c43 100644 --- a/library/cpp/testing/benchmark/main/main.cpp +++ b/library/cpp/testing/benchmark/main/main.cpp @@ -1,4 +1,4 @@ -#include <library/cpp/testing/benchmark/bench.h> +#include <library/cpp/testing/benchmark/bench.h> #include <util/generic/yexception.h> #include <util/stream/output.h> diff --git a/library/cpp/testing/benchmark/main/ya.make b/library/cpp/testing/benchmark/main/ya.make index 8ae7e336bd..d00cdcf9fc 100644 --- a/library/cpp/testing/benchmark/main/ya.make +++ b/library/cpp/testing/benchmark/main/ya.make @@ -10,7 +10,7 @@ SRCS( ) PEERDIR( - library/cpp/testing/benchmark + library/cpp/testing/benchmark ) END() diff --git a/library/cpp/testing/benchmark/ya.make b/library/cpp/testing/benchmark/ya.make index 1a2d32c4cd..f42be80698 100644 --- a/library/cpp/testing/benchmark/ya.make +++ b/library/cpp/testing/benchmark/ya.make @@ -13,10 +13,10 @@ SRCS( PEERDIR( contrib/libs/re2 library/cpp/colorizer - library/cpp/getopt/small + library/cpp/getopt/small library/cpp/json library/cpp/linear_regression - library/cpp/threading/poor_man_openmp + library/cpp/threading/poor_man_openmp ) END() diff --git a/library/cpp/testing/gmock_in_unittest/events.cpp b/library/cpp/testing/gmock_in_unittest/events.cpp index 058d4c9087..dbd65b727d 100644 --- a/library/cpp/testing/gmock_in_unittest/events.cpp +++ b/library/cpp/testing/gmock_in_unittest/events.cpp @@ -1,6 +1,6 @@ #include "events.h" -#include <library/cpp/testing/unittest/registar.h> +#include <library/cpp/testing/unittest/registar.h> #include <util/generic/strbuf.h> #include <util/generic/string.h> 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 9cdebaf928..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 @@ -1,6 +1,6 @@ #include <library/cpp/testing/gmock_in_unittest/gmock.h> -#include <library/cpp/testing/unittest/registar.h> +#include <library/cpp/testing/unittest/registar.h> #include <util/generic/string.h> diff --git a/library/cpp/testing/gmock_in_unittest/registration.cpp b/library/cpp/testing/gmock_in_unittest/registration.cpp index b2c9ee7812..c2872a4c27 100644 --- a/library/cpp/testing/gmock_in_unittest/registration.cpp +++ b/library/cpp/testing/gmock_in_unittest/registration.cpp @@ -2,7 +2,7 @@ #include <gmock/gmock.h> -#include <library/cpp/testing/unittest/plugin.h> +#include <library/cpp/testing/unittest/plugin.h> namespace { class TGMockUnittestPlugin: public NUnitTest::NPlugin::IPlugin { diff --git a/library/cpp/testing/gmock_in_unittest/ya.make b/library/cpp/testing/gmock_in_unittest/ya.make index e7fb9fc7df..5de68ad98d 100644 --- a/library/cpp/testing/gmock_in_unittest/ya.make +++ b/library/cpp/testing/gmock_in_unittest/ya.make @@ -6,7 +6,7 @@ PEERDIR( contrib/restricted/googletest/googlemock contrib/restricted/googletest/googletest library/cpp/testing/gtest_extensions - library/cpp/testing/unittest + library/cpp/testing/unittest ) SRCS( diff --git a/library/cpp/testing/unittest/example_ut.cpp b/library/cpp/testing/unittest/example_ut.cpp index 7dd238e1a0..bcc1ce33f0 100644 --- a/library/cpp/testing/unittest/example_ut.cpp +++ b/library/cpp/testing/unittest/example_ut.cpp @@ -1,4 +1,4 @@ -#include <library/cpp/testing/unittest/registar.h> +#include <library/cpp/testing/unittest/registar.h> /* * just copy-paste it for good start point diff --git a/library/cpp/testing/unittest/fat/test_port_manager.cpp b/library/cpp/testing/unittest/fat/test_port_manager.cpp index b8fa5ab39d..f77d2e3a25 100644 --- a/library/cpp/testing/unittest/fat/test_port_manager.cpp +++ b/library/cpp/testing/unittest/fat/test_port_manager.cpp @@ -1,5 +1,5 @@ -#include <library/cpp/testing/unittest/registar.h> -#include <library/cpp/testing/unittest/tests_data.h> +#include <library/cpp/testing/unittest/registar.h> +#include <library/cpp/testing/unittest/tests_data.h> bool IsFreePort(ui16 port) { TInet6StreamSocket sock; diff --git a/library/cpp/testing/unittest/registar.cpp b/library/cpp/testing/unittest/registar.cpp index 3bd65ef2e1..3679b768ed 100644 --- a/library/cpp/testing/unittest/registar.cpp +++ b/library/cpp/testing/unittest/registar.cpp @@ -1,6 +1,6 @@ #include "registar.h" -#include <library/cpp/diff/diff.h> +#include <library/cpp/diff/diff.h> #include <library/cpp/colorizer/colors.h> #include <util/generic/bt_exception.h> diff --git a/library/cpp/testing/unittest/registar.h b/library/cpp/testing/unittest/registar.h index 6bcaf3c909..44517a0092 100644 --- a/library/cpp/testing/unittest/registar.h +++ b/library/cpp/testing/unittest/registar.h @@ -46,7 +46,7 @@ namespace NUnitTest { TString GetResetTag(); // Raise error handler - // Used for testing library/cpp/testing/unittest macroses + // Used for testing library/cpp/testing/unittest macroses // and unittest helpers. // For all other unittests standard handler is used using TRaiseErrorHandler = std::function<void(const char*, const TString&, bool)>; diff --git a/library/cpp/testing/unittest/registar_ut.cpp b/library/cpp/testing/unittest/registar_ut.cpp index 7d42768383..1f36d53abb 100644 --- a/library/cpp/testing/unittest/registar_ut.cpp +++ b/library/cpp/testing/unittest/registar_ut.cpp @@ -1,4 +1,4 @@ -#include <library/cpp/testing/unittest/registar.h> +#include <library/cpp/testing/unittest/registar.h> Y_UNIT_TEST_SUITE(TUnitTestMacroTest) { Y_UNIT_TEST(Assert) { diff --git a/library/cpp/testing/unittest/ut/main.cpp b/library/cpp/testing/unittest/ut/main.cpp index 02d979560d..e303e21e30 100644 --- a/library/cpp/testing/unittest/ut/main.cpp +++ b/library/cpp/testing/unittest/ut/main.cpp @@ -1,6 +1,6 @@ -#include <library/cpp/testing/unittest/gtest.h> -#include <library/cpp/testing/unittest/registar.h> -#include <library/cpp/testing/unittest/tests_data.h> +#include <library/cpp/testing/unittest/gtest.h> +#include <library/cpp/testing/unittest/registar.h> +#include <library/cpp/testing/unittest/tests_data.h> #include <util/generic/set.h> #include <util/network/sock.h> diff --git a/library/cpp/testing/unittest/ut/ya.make b/library/cpp/testing/unittest/ut/ya.make index 318d3e5980..6d4c0959cc 100644 --- a/library/cpp/testing/unittest/ut/ya.make +++ b/library/cpp/testing/unittest/ut/ya.make @@ -1,4 +1,4 @@ -UNITTEST_FOR(library/cpp/testing/unittest) +UNITTEST_FOR(library/cpp/testing/unittest) OWNER(snowball) diff --git a/library/cpp/testing/unittest/utmain.cpp b/library/cpp/testing/unittest/utmain.cpp index fcc2bd2632..305bc6b40f 100644 --- a/library/cpp/testing/unittest/utmain.cpp +++ b/library/cpp/testing/unittest/utmain.cpp @@ -612,7 +612,7 @@ static int DoUsage(const char* progname) { << "Options:\n" << " -h, --help print this help message\n" << " -l, --list print a list of available tests\n" - << " -A --list-verbose print a list of available subtests\n" + << " -A --list-verbose print a list of available subtests\n" << " --print-before-test print each test name before running it\n" << " --print-before-suite print each test suite name before running it\n" << " --show-fails print a list of all failed tests at the end\n" @@ -683,7 +683,7 @@ int NUnitTest::RunMain(int argc, char** argv) { return DoUsage(argv[0]); } else if (strcmp(name, "--list") == 0 || strcmp(name, "-l") == 0) { listTests = LIST; - } else if (strcmp(name, "--list-verbose") == 0 || strcmp(name, "-A") == 0) { + } else if (strcmp(name, "--list-verbose") == 0 || strcmp(name, "-A") == 0) { listTests = LIST_VERBOSE; } else if (strcmp(name, "--print-before-suite=false") == 0) { processor.SetPrintBeforeSuite(false); diff --git a/library/cpp/testing/unittest/ya.make b/library/cpp/testing/unittest/ya.make index d247605826..aaa4f2ba85 100644 --- a/library/cpp/testing/unittest/ya.make +++ b/library/cpp/testing/unittest/ya.make @@ -10,7 +10,7 @@ OWNER( PEERDIR( library/cpp/colorizer library/cpp/dbg_output - library/cpp/diff + library/cpp/diff library/cpp/json/writer library/cpp/testing/common library/cpp/testing/hook diff --git a/library/cpp/testing/unittest_main/main.cpp b/library/cpp/testing/unittest_main/main.cpp index 984203e304..fc5d2d9418 100644 --- a/library/cpp/testing/unittest_main/main.cpp +++ b/library/cpp/testing/unittest_main/main.cpp @@ -1,4 +1,4 @@ -#include <library/cpp/testing/unittest/utmain.h> +#include <library/cpp/testing/unittest/utmain.h> int main(int argc, char** argv) { return NUnitTest::RunMain(argc, argv); diff --git a/library/cpp/testing/unittest_main/ya.make b/library/cpp/testing/unittest_main/ya.make index eb6df9dbaa..80a6cc699b 100644 --- a/library/cpp/testing/unittest_main/ya.make +++ b/library/cpp/testing/unittest_main/ya.make @@ -3,8 +3,8 @@ LIBRARY() OWNER(pg) PEERDIR( - library/cpp/testing/unittest - library/cpp/terminate_handler + library/cpp/testing/unittest + library/cpp/terminate_handler ) SRCS( diff --git a/library/cpp/testing/ya.make b/library/cpp/testing/ya.make index 96426b026a..6a57ac2ee6 100644 --- a/library/cpp/testing/ya.make +++ b/library/cpp/testing/ya.make @@ -1,9 +1,9 @@ RECURSE( common - benchmark - benchmark/examples - benchmark/examples/metrics - benchmark/main + benchmark + benchmark/examples + benchmark/examples/metrics + benchmark/main boost_test boost_test_main dump_clang_coverage @@ -18,7 +18,7 @@ RECURSE( gtest_protobuf hook mock_server - unittest - unittest_main + unittest + unittest_main urlnorm ) |