forked from skycoin/libskycoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move isU8Eq from lib/cgo/tests/testutils/libsky_assert.c to lib/cgo/tests/testutils/common.c ref skycoin#34
- Loading branch information
Alvaro Denis
committed
May 14, 2019
1 parent
47f8d0f
commit af6585c
Showing
3 changed files
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#include "common.h" | ||
|
||
#include <stddef.h> | ||
|
||
int isU8Eq(unsigned char p1[], unsigned char p2[], int len) | ||
{ | ||
size_t i; | ||
for (i= 0; i < len; i++) { | ||
if (p1[i] != p2[i]) | ||
{ | ||
return 0; | ||
} | ||
} | ||
|
||
return 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef TEST_UTIL_COMMON | ||
#define TEST_UTIL_COMMON | ||
|
||
int isU8Eq(unsigned char p1[], unsigned char p2[], int len); | ||
|
||
#endif // TEST_UTIL_COMMON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters