summaryrefslogtreecommitdiffstats
path: root/test/openpower-pels/pel_manager_test.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-10-11 10:39:30 -0500
committerMatt Spinler <spinler@us.ibm.com>2019-10-22 09:10:37 -0500
commit42828bd922d6e067089770112de5ec22d2df8ab1 (patch)
tree61a552dbfaa53f7eb1e3104a8a8d73f60548e15f /test/openpower-pels/pel_manager_test.cpp
parent31eed996da81cf6e35e7ddd035aa8088be230218 (diff)
downloadphosphor-logging-42828bd922d6e067089770112de5ec22d2df8ab1.tar.gz
phosphor-logging-42828bd922d6e067089770112de5ec22d2df8ab1.zip
PEL: Refactor the test data factory
This commit has no functional changes, it just does some things to make the PEL data creator for testcases, pelDataFactory(), be more manageable: - Change to return a plain vector instead of a unique_ptr<vector>. - Keeps the data for each section in separate vectors and then either returns those as-is or combines them into a PEL. - Change the TestPelType enum to TestPELType to match the style guide. - Have pelDataFactory provide the SRC section instead of srcDataFactory. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: I4770aa6a8169e89b6b8f685a9994d845c9e93cfe
Diffstat (limited to 'test/openpower-pels/pel_manager_test.cpp')
-rw-r--r--test/openpower-pels/pel_manager_test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/openpower-pels/pel_manager_test.cpp b/test/openpower-pels/pel_manager_test.cpp
index 61fbedd..9014dd8 100644
--- a/test/openpower-pels/pel_manager_test.cpp
+++ b/test/openpower-pels/pel_manager_test.cpp
@@ -34,11 +34,11 @@ TEST_F(ManagerTest, TestCreateWithPEL)
// Create a PEL, write it to a file, and pass that filename into
// the create function.
- auto data = pelDataFactory(TestPelType::pelSimple);
+ auto data = pelDataFactory(TestPELType::pelSimple);
fs::path pelFilename = makeTempDir() / "rawpel";
std::ofstream pelFile{pelFilename};
- pelFile.write(reinterpret_cast<const char*>(data->data()), data->size());
+ pelFile.write(reinterpret_cast<const char*>(data.data()), data.size());
pelFile.close();
std::string adItem = "RAWPEL=" + pelFilename.string();
OpenPOWER on IntegriCloud