1421128efSShawn McCarney /**
2421128efSShawn McCarney  * Copyright © 2021 IBM Corporation
3421128efSShawn McCarney  *
4421128efSShawn McCarney  * Licensed under the Apache License, Version 2.0 (the "License");
5421128efSShawn McCarney  * you may not use this file except in compliance with the License.
6421128efSShawn McCarney  * You may obtain a copy of the License at
7421128efSShawn McCarney  *
8421128efSShawn McCarney  *     http://www.apache.org/licenses/LICENSE-2.0
9421128efSShawn McCarney  *
10421128efSShawn McCarney  * Unless required by applicable law or agreed to in writing, software
11421128efSShawn McCarney  * distributed under the License is distributed on an "AS IS" BASIS,
12421128efSShawn McCarney  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13421128efSShawn McCarney  * See the License for the specific language governing permissions and
14421128efSShawn McCarney  * limitations under the License.
15421128efSShawn McCarney  */
16*e6d54a1fSShawn McCarney #include "error_history.hpp"
17421128efSShawn McCarney #include "phase_fault.hpp"
18421128efSShawn McCarney 
19421128efSShawn McCarney #include <gtest/gtest.h>
20421128efSShawn McCarney 
21421128efSShawn McCarney using namespace phosphor::power::regulators;
22421128efSShawn McCarney 
TEST(PhaseFaultTests,ToErrorType)23*e6d54a1fSShawn McCarney TEST(PhaseFaultTests, ToErrorType)
24*e6d54a1fSShawn McCarney {
25*e6d54a1fSShawn McCarney     EXPECT_EQ(toErrorType(PhaseFaultType::n), ErrorType::phaseFaultN);
26*e6d54a1fSShawn McCarney     EXPECT_EQ(toErrorType(PhaseFaultType::n_plus_1),
27*e6d54a1fSShawn McCarney               ErrorType::phaseFaultNPlus1);
28*e6d54a1fSShawn McCarney }
29*e6d54a1fSShawn McCarney 
TEST(PhaseFaultTests,ToString)30421128efSShawn McCarney TEST(PhaseFaultTests, ToString)
31421128efSShawn McCarney {
32421128efSShawn McCarney     EXPECT_EQ(toString(PhaseFaultType::n), "n");
33421128efSShawn McCarney     EXPECT_EQ(toString(PhaseFaultType::n_plus_1), "n+1");
34421128efSShawn McCarney }
35