Pretty print BuildInformation in unit tests

Change-Id: I1f702edc731454c84667c79e05c94b4360a40111
This commit is contained in:
Fred Gylys-Colwell
2023-08-21 21:24:42 -07:00
committed by Robert Shih
parent ac5f0135d5
commit 36d4c4c4b7

View File

@@ -227,6 +227,13 @@ TEST_F(OEMCryptoClientTest, VersionNumber) {
if (build_info.size() != buf_length) {
build_info.resize(buf_length);
}
const std::string comma = ",";
const std::string pretty_comma = ",\n ";
std::string::size_type pos = 0;
while ((pos = build_info.find(comma, pos)) != std::string::npos) {
build_info.replace(pos, comma.size(), pretty_comma);
pos += pretty_comma.size();
}
cout << " BuildInformation: " << build_info << endl;
OEMCrypto_WatermarkingSupport support = OEMCrypto_GetWatermarkingSupport();
cout << " WatermarkingSupport: " << support << endl;