@@ -48,8 +48,8 @@ Y_UNIT_TEST_SUITE(TLangVerTests) {
4848 }
4949
5050 Y_UNIT_TEST (Available) {
51- UNIT_ASSERT (IsAvalableLangVersion (MakeLangVersion (2025 ,2 ),MakeLangVersion (2025 ,2 )));
52- UNIT_ASSERT (!IsAvalableLangVersion (MakeLangVersion (2025 ,3 ),MakeLangVersion (2025 ,2 )));
51+ UNIT_ASSERT (IsAvailableLangVersion (MakeLangVersion (2025 ,2 ),MakeLangVersion (2025 ,2 )));
52+ UNIT_ASSERT (!IsAvailableLangVersion (MakeLangVersion (2025 ,3 ),MakeLangVersion (2025 ,2 )));
5353 }
5454
5555 Y_UNIT_TEST (MaxReleasedLangVersionIsValid) {
@@ -63,6 +63,33 @@ Y_UNIT_TEST_SUITE(TLangVerTests) {
6363 Y_UNIT_TEST (MaxVersionIsAboveThanReleased) {
6464 UNIT_ASSERT (GetMaxLangVersion () > GetMaxReleasedLangVersion ());
6565 }
66+
67+ Y_UNIT_TEST (BackwardCompatibleFeatureAvailable_All) {
68+ UNIT_ASSERT (IsBackwardCompatibleFeatureAvailable (MinLangVersion, MinLangVersion,
69+ EBackportCompatibleFeaturesMode::All));
70+ UNIT_ASSERT (IsBackwardCompatibleFeatureAvailable (MinLangVersion, GetMaxReleasedLangVersion (),
71+ EBackportCompatibleFeaturesMode::All));
72+ UNIT_ASSERT (IsBackwardCompatibleFeatureAvailable (MinLangVersion, GetMaxLangVersion (),
73+ EBackportCompatibleFeaturesMode::All));
74+ }
75+
76+ Y_UNIT_TEST (BackwardCompatibleFeatureAvailable_Released) {
77+ UNIT_ASSERT (IsBackwardCompatibleFeatureAvailable (MinLangVersion, MinLangVersion,
78+ EBackportCompatibleFeaturesMode::Released));
79+ UNIT_ASSERT (IsBackwardCompatibleFeatureAvailable (MinLangVersion, GetMaxReleasedLangVersion (),
80+ EBackportCompatibleFeaturesMode::Released));
81+ UNIT_ASSERT (!IsBackwardCompatibleFeatureAvailable (MinLangVersion, GetMaxLangVersion (),
82+ EBackportCompatibleFeaturesMode::Released));
83+ }
84+
85+ Y_UNIT_TEST (BackwardCompatibleFeatureAvailable_None) {
86+ UNIT_ASSERT (IsBackwardCompatibleFeatureAvailable (MinLangVersion, MinLangVersion,
87+ EBackportCompatibleFeaturesMode::None));
88+ UNIT_ASSERT (!IsBackwardCompatibleFeatureAvailable (MinLangVersion, GetMaxReleasedLangVersion (),
89+ EBackportCompatibleFeaturesMode::None));
90+ UNIT_ASSERT (!IsBackwardCompatibleFeatureAvailable (MinLangVersion, GetMaxLangVersion (),
91+ EBackportCompatibleFeaturesMode::None));
92+ }
6693}
6794
6895}
0 commit comments