History

Add encoder test

jwwang committed 12 years ago

Commit 6f58a0c1 parent cb0053f6 files · +170 −12Browse files

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

Unified · Split

test/decoder_test.cpp+1−11
@@ -11,17 +11,7 @@ · 10 unmodified lines
1111 #include "codec_api.h"
1212
1313 #include "utils/BufferedData.h"
14−
15−static bool CompareHash(unsigned char(&digest)[SHA_DIGEST_LENGTH],
16− const char* hashStr) {
17−
18− char hashStrCmp[SHA_DIGEST_LENGTH * 2 + 1];
19− for (int i = 0; i < SHA_DIGEST_LENGTH; ++i) {
20− sprintf(&hashStrCmp[i*2], "%.2x", digest[i]);
21− }
22− hashStrCmp[SHA_DIGEST_LENGTH * 2] = '\0';
23− return strncmp(hashStr, hashStrCmp, SHA_DIGEST_LENGTH * 2) == 0;
24−}
14+#include "utils/HashFunctions.h"
2515
2616 static void UpdateHashFromPlane(SHA_CTX* ctx, const uint8_t* plane,
2717 int width, int height, int stride) {

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