lib: Move the bupsplit selftest into our test framework
We weren't running it before. Also I switched it to use GLib. Preparation for some oxidation work (having an implementation of bupsplit in Rust). I exported another function to do the raw rollsum operation which is what this test suite uses. Closes: #655 Approved by: jlebon
This commit is contained in:
1 parent
95b15afe13
commit
5eea1cdad8
3 files changed
+33
-38
No files matched your search
@@ -30,6 +30,9 @@
|
||||
#ifndef __BUPSPLIT_H
|
||||
#define __BUPSPLIT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define BUP_BLOBBITS (13)
|
||||
#define BUP_BLOBSIZE (1<<BUP_BLOBBITS)
|
||||
#define BUP_WINDOWBITS (7)
|
||||
@@ -38,9 +41,9 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
uint32_t bupsplit_sum(uint8_t *buf, size_t ofs, size_t len);
|
||||
int bupsplit_find_ofs(const unsigned char *buf, int len, int *bits);
|
||||
int bupsplit_selftest(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user