local_flags_ut.cpp 722 B

123456789101112131415161718
  1. #include <library/cpp/testing/unittest/registar.h>
  2. #include "local_flags.h"
  3. using namespace NBus;
  4. using namespace NBus::NPrivate;
  5. Y_UNIT_TEST_SUITE(EMessageLocalFlags) {
  6. Y_UNIT_TEST(TestLocalFlagSetToString) {
  7. UNIT_ASSERT_VALUES_EQUAL("0", LocalFlagSetToString(0));
  8. UNIT_ASSERT_VALUES_EQUAL("MESSAGE_REPLY_INTERNAL",
  9. LocalFlagSetToString(MESSAGE_REPLY_INTERNAL));
  10. UNIT_ASSERT_VALUES_EQUAL("MESSAGE_IN_WORK|MESSAGE_IN_FLIGHT_ON_CLIENT",
  11. LocalFlagSetToString(MESSAGE_IN_WORK | MESSAGE_IN_FLIGHT_ON_CLIENT));
  12. UNIT_ASSERT_VALUES_EQUAL("0xff3456",
  13. LocalFlagSetToString(0xff3456));
  14. }
  15. }