1
0
mirror of https://github.com/fumiama/fumidb.git synced 2026-06-22 21:50:28 +08:00

init source code

This commit is contained in:
源文雨
2022-04-26 16:58:05 +08:00
parent ea4ca63b49
commit b408094d1c
5 changed files with 103 additions and 0 deletions

6
tests/CMakeLists.txt Normal file
View File

@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.0.0)
project(fumidb_test VERSION 1.0)
add_executable(binary_test binary_test.c)
add_test(test_binary binary_test COMMAND binary_test)

12
tests/binary_test.c Normal file
View File

@@ -0,0 +1,12 @@
#include "../src/binary.h"
int main() {
char buf[8];
putle16(buf, 1);
if(buf[0] != 1) return 1;
putle32(buf, 2);
if(buf[0] != 2) return 2;
putle64(buf, 3);
if(buf[0] != 3) return 3;
return 0;
}