aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/local_flags_ut.cpp
blob: 189d73eb0f3f697ca7ed0f51858bb63220d87b83 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <library/cpp/testing/unittest/registar.h>

#include "local_flags.h"

using namespace NBus;
using namespace NBus::NPrivate;

Y_UNIT_TEST_SUITE(EMessageLocalFlags) {
    Y_UNIT_TEST(TestLocalFlagSetToString) {
        UNIT_ASSERT_VALUES_EQUAL("0", LocalFlagSetToString(0));
        UNIT_ASSERT_VALUES_EQUAL("MESSAGE_REPLY_INTERNAL",
                                 LocalFlagSetToString(MESSAGE_REPLY_INTERNAL));
        UNIT_ASSERT_VALUES_EQUAL("MESSAGE_IN_WORK|MESSAGE_IN_FLIGHT_ON_CLIENT",
                                 LocalFlagSetToString(MESSAGE_IN_WORK | MESSAGE_IN_FLIGHT_ON_CLIENT));
        UNIT_ASSERT_VALUES_EQUAL("0xff3456",
                                 LocalFlagSetToString(0xff3456));
    }
}