Matt Spinler | 8c686cc | 2019-09-20 13:46:02 -0500 | [diff] [blame] | 1 | #include "extensions/openpower-pels/severity.hpp" |
| 2 | |
| 3 | #include <gtest/gtest.h> |
| 4 | |
| 5 | using namespace openpower::pels; |
| 6 | using LogSeverity = phosphor::logging::Entry::Level; |
| 7 | |
| 8 | TEST(SeverityTest, SeverityMapTest) |
| 9 | { |
| 10 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Informational), 0x00); |
| 11 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Notice), 0x00); |
| 12 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Debug), 0x00); |
| 13 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Warning), 0x20); |
| 14 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Critical), 0x50); |
| 15 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Emergency), 0x40); |
| 16 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Alert), 0x40); |
| 17 | ASSERT_EQ(convertOBMCSeverityToPEL(LogSeverity::Error), 0x40); |
| 18 | } |