| 112 | |
| 113 | } |
| 114 | TEST_P (DecodeEncodeTest, CompareOutput) { |
| 115 | DecodeEncodeFileParam p = GetParam(); |
| 116 | SEncParamExt EnxParamExt; |
| 117 | DecEncFileParamToParamExt (&p, &EnxParamExt); |
| 118 | |
| 119 | #if defined(ANDROID_NDK) |
| 120 | std::string filename = std::string ("/sdcard/") + p.fileName; |
| 121 | ASSERT_TRUE (Open (filename.c_str())); |
| 122 | #else |
| 123 | ASSERT_TRUE (Open (p.fileName)); |
| 124 | #endif |
| 125 | EncodeStream (this, &EnxParamExt, this); |
| 126 | unsigned char digest[SHA_DIGEST_LENGTH]; |
| 127 | SHA1Result (&ctx_, digest); |
| 128 | if (!HasFatalFailure()) { |
| 129 | CompareHash (digest, p.hashStr); |
| 130 | } |
| 131 | } |
| 132 | static const DecodeEncodeFileParam kFileParamArray[] = { |
| 133 | {"res/test_vd_1d.264", "34fc3aee85cc0b0223c2701d810a536fe3818a00", 320, 192, 12.0f}, |
| 134 | {"res/test_vd_rc.264", "9f15b0677b5f7daa922079ec4fa49e3f457fc998", 320, 192, 12.0f}, |
nothing calls this directly
no test coverage detected