History

astyle all

huili2 committed 12 years ago

Commit dc3fae41 parent 101265385 files · +4906 −4701Browse files

Showing the changes to test/api/decoder_test.cpp (1 of 85 files). Show all

Unified · Split

test/api/decoder_test.cpp+16−16
@@ -2,10 +2,10 @@ · 1 unmodified line
22 #include "utils/HashFunctions.h"
33 #include "BaseDecoderTest.h"
44
5−static void UpdateHashFromPlane(SHA1Context* ctx, const uint8_t* plane,
6− int width, int height, int stride) {
5+static void UpdateHashFromPlane (SHA1Context* ctx, const uint8_t* plane,
6+ int width, int height, int stride) {
77 for (int i = 0; i < height; i++) {
8− SHA1Input(ctx, plane, width);
8+ SHA1Input (ctx, plane, width);
99 plane += stride;
1010 }
1111 }
@@ -21,7 +21,7 @@ class DecoderInitTest : public ::testing::Test, public BaseDecoderTest { · 9 unmodified lines
2121 }
2222 };
2323
24−TEST_F(DecoderInitTest, JustInit) {}
24+TEST_F (DecoderInitTest, JustInit) {}
2525
2626 struct FileParam {
2727 const char* fileName;
@@ -29,35 +29,35 @@ struct FileParam { · 1 unmodified line
2929 };
3030
3131 class DecoderOutputTest : public ::testing::WithParamInterface<FileParam>,
32− public DecoderInitTest, public BaseDecoderTest::Callback {
32+ public DecoderInitTest, public BaseDecoderTest::Callback {
3333 public:
3434 virtual void SetUp() {
3535 DecoderInitTest::SetUp();
3636 if (HasFatalFailure()) {
3737 return;
3838 }
39− SHA1Reset(&ctx_);
39+ SHA1Reset (&ctx_);
4040 }
41− virtual void onDecodeFrame(const Frame& frame) {
41+ virtual void onDecodeFrame (const Frame& frame) {
4242 const Plane& y = frame.y;
4343 const Plane& u = frame.u;
4444 const Plane& v = frame.v;
45− UpdateHashFromPlane(&ctx_, y.data, y.width, y.height, y.stride);
46− UpdateHashFromPlane(&ctx_, u.data, u.width, u.height, u.stride);
47− UpdateHashFromPlane(&ctx_, v.data, v.width, v.height, v.stride);
45+ UpdateHashFromPlane (&ctx_, y.data, y.width, y.height, y.stride);
46+ UpdateHashFromPlane (&ctx_, u.data, u.width, u.height, u.stride);
47+ UpdateHashFromPlane (&ctx_, v.data, v.width, v.height, v.stride);
4848 }
4949 protected:
5050 SHA1Context ctx_;
5151 };
5252
53−TEST_P(DecoderOutputTest, CompareOutput) {
53+TEST_P (DecoderOutputTest, CompareOutput) {
5454 FileParam p = GetParam();
55− DecodeFile(p.fileName, this);
55+ DecodeFile (p.fileName, this);
5656
5757 unsigned char digest[SHA_DIGEST_LENGTH];
58− SHA1Result(&ctx_, digest);
58+ SHA1Result (&ctx_, digest);
5959 if (!HasFatalFailure()) {
60− CompareHash(digest, p.hashStr);
60+ CompareHash (digest, p.hashStr);
6161 }
6262 }
6363
@@ -96,5 +96,5 @@ static const FileParam kFileParamArray[] = { · 32 unmodified lines
9696 {"res/SVA_NL2_E.264", "70453ef8097c94dd190d6d2d1d5cb83c67e66238"}
9797 };
9898
99−INSTANTIATE_TEST_CASE_P(DecodeFile, DecoderOutputTest,
100− ::testing::ValuesIn(kFileParamArray));
99+INSTANTIATE_TEST_CASE_P (DecodeFile, DecoderOutputTest,
100+ ::testing::ValuesIn (kFileParamArray));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t