1
0
mirror of https://github.com/fumiama/fumidb.git synced 2026-06-07 19:40:24 +08:00
Files
fumidb/tests/types_test.c
源文雨 67b9176615 add types
2022-05-01 21:16:17 +08:00

22 lines
506 B
C

#include <unistd.h>
#include <fcntl.h>
#include "../include/binary.h"
#include "../include/file.h"
#include "../include/types.h"
int main() {
int fd = open("types_test_tmp.bin", O_RDWR | O_CREAT | O_TRUNC, 0644);
if(fd < 0) {
perror("create");
return 1;
}
if(init_file_header_page(fd) < 0) return 2;
uint64_t ptr = create_index(fd, TYPE_INT8);
if(!ptr) {
perror("create_index");
return 3;
}
close(fd);
// remove("types_test_tmp.bin");
}