Convert psnr and ssim to strings before printing them.

Review URL: https://webrtc-codereview.appspot.com/1042004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3380 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org 2013-01-17 13:35:01 +00:00
parent a4b58860b7
commit 3b7feb2a5d

View File

@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <sstream>
#include <string>
#include <vector>
#include "gtest/gtest.h"
@ -327,12 +329,18 @@ TEST_P(ParameterizedFullStackTest, RunsFullStackWithoutErrors) {
EXPECT_GE(actual_psnr, kExpectedMinimumPSNR);
EXPECT_GE(actual_ssim, kExpectedMinimumSSIM);
std::stringstream ss;
ss << std::setprecision(3) << std::fixed << actual_psnr;
webrtc::test::PrintResult(
"psnr", "", parameter_table_[GetParam()].test_label,
actual_psnr, "dB", false);
ss.str(), "dB", false);
ss.str("");
ss << std::setprecision(3) << std::fixed << actual_ssim;
webrtc::test::PrintResult(
"ssim", "", parameter_table_[GetParam()].test_label,
actual_ssim, "", false);
ss.str(), "", false);
}
INSTANTIATE_TEST_CASE_P(FullStackTests, ParameterizedFullStackTest,