aboutsummaryrefslogtreecommitdiffstats
path: root/tools/enum_parser/parse_enum/ut/enums.cpp
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-04-16 21:36:37 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-04-16 21:45:42 +0300
commit3ea83364cefbeccd47cda1bc6ea58966cd308c94 (patch)
tree315f7e0fb38c45dd788a5bfc025e316806a6df7a /tools/enum_parser/parse_enum/ut/enums.cpp
parent6a420b1b5db93711a8e95b08776247cedaa0259f (diff)
downloadydb-3ea83364cefbeccd47cda1bc6ea58966cd308c94.tar.gz
Intermediate changes
Diffstat (limited to 'tools/enum_parser/parse_enum/ut/enums.cpp')
-rw-r--r--tools/enum_parser/parse_enum/ut/enums.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/enum_parser/parse_enum/ut/enums.cpp b/tools/enum_parser/parse_enum/ut/enums.cpp
index 92e5470680..3a9df14f5e 100644
--- a/tools/enum_parser/parse_enum/ut/enums.cpp
+++ b/tools/enum_parser/parse_enum/ut/enums.cpp
@@ -8,6 +8,7 @@
#include <util/generic/serialized_enum.h>
#include <library/cpp/testing/unittest/registar.h>
+#include <util/generic/algorithm.h>
#include <util/generic/ptr.h>
#include <util/generic/singleton.h>
@@ -197,4 +198,11 @@ Y_UNIT_TEST_SUITE(TEnumGeneratorTest) {
Y_UNIT_TEST(EnumSerializerDestructionPriority) {
Singleton<TEnumSerializationInitializerHolder>()->Init();
}
+
+ Y_UNIT_TEST(ValuesSortTest) {
+ const auto& allValues = GetEnumAllValues<ENontrivialValues>();
+ UNIT_ASSERT_VALUES_EQUAL(allValues.size(), 4u);
+ UNIT_ASSERT(IsSorted(allValues.begin(), allValues.end()));
+ }
+
};