1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ash / components / arc / session / arc_management_transition_unittest.cc [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <sstream>
#include "ash/components/arc/session/arc_management_transition.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace arc {
namespace {
std::string ConvertToString(ArcManagementTransition transition) {
std::stringstream ss;
ss << transition;
return ss.str();
}
// Tests "<<" operator for ArcManagementTransition type.
TEST(ArcManagementTransitionTest, EnumTypeStreamOutput) {
EXPECT_EQ(ConvertToString(ArcManagementTransition::NO_TRANSITION),
"NO_TRANSITION");
EXPECT_EQ(ConvertToString(ArcManagementTransition::CHILD_TO_REGULAR),
"CHILD_TO_REGULAR");
EXPECT_EQ(ConvertToString(ArcManagementTransition::REGULAR_TO_CHILD),
"REGULAR_TO_CHILD");
EXPECT_EQ(ConvertToString(ArcManagementTransition::UNMANAGED_TO_MANAGED),
"UNMANAGED_TO_MANAGED");
}
} // namespace
} // namespace arc