From 597eebe4df34bff704be1dff36c14768f426e488 Mon Sep 17 00:00:00 2001
From: Pavel Tsayukov
Date: Wed, 4 Sep 2024 15:13:31 +0300
Subject: [PATCH] Add tests for library/cpp/int128 into listfile (#313)
---
library/cpp/int128/CMakeLists.txt | 4 +
library/cpp/int128/ut/CMakeLists.txt | 105 +++++++++++++++++++++++++++
2 files changed, 109 insertions(+)
create mode 100644 library/cpp/int128/ut/CMakeLists.txt
diff --git a/library/cpp/int128/CMakeLists.txt b/library/cpp/int128/CMakeLists.txt
index c9d5b4c2e9..d9520c494e 100644
--- a/library/cpp/int128/CMakeLists.txt
+++ b/library/cpp/int128/CMakeLists.txt
@@ -1,3 +1,7 @@
+if (YDB_SDK_TESTS)
+ add_subdirectory(ut)
+endif()
+
_ydb_sdk_add_library(int128)
target_sources(int128
diff --git a/library/cpp/int128/ut/CMakeLists.txt b/library/cpp/int128/ut/CMakeLists.txt
new file mode 100644
index 0000000000..32837a3d5b
--- /dev/null
+++ b/library/cpp/int128/ut/CMakeLists.txt
@@ -0,0 +1,105 @@
+#[=[ TODO: fix bug with std::signbit
+add_ydb_test(NAME int128-int128_ut
+ SOURCES
+ int128_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+#]=]
+
+add_ydb_test(NAME int128-int128_typetraits_ut
+ SOURCES
+ int128_typetraits_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+
+add_ydb_test(NAME int128-i128_ut
+ SOURCES
+ i128_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+
+add_ydb_test(NAME int128-i128_and_intrinsic_identity_ut
+ SOURCES
+ i128_and_intrinsic_identity_ut.cpp
+ int128_ut_helpers.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+
+add_ydb_test(NAME int128-int128_via_intrinsic_ut
+ SOURCES
+ int128_via_intrinsic_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+
+add_ydb_test(NAME int128-int128_old_ut
+ SOURCES
+ int128_old_ut.cpp
+ int128_ut_helpers.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+
+add_ydb_test(NAME int128-i128_division_ut
+ SOURCES
+ i128_division_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+
+#[=[ TODO: fix bug with std::signbit
+add_ydb_test(NAME int128-i128_type_traits_ut
+ SOURCES
+ i128_type_traits_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+#]=]
+
+add_ydb_test(NAME int128-i128_comparison_ut
+ SOURCES
+ i128_comparison_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)
+
+add_ydb_test(NAME int128-ui128_division_ut
+ SOURCES
+ ui128_division_ut.cpp
+ LINK_LIBRARIES
+ int128
+ cpp-testing-unittest_main
+ LABELS
+ unit
+)