Files
dat-thang/tests/test_proto.c
T
divorce b735900f2e 0.0.002
ddat interop with dat js
cable interop with cabal js
ddat's frontend = dat-thang
cable fe = cable-thang
dillo support based on cel's dillo-dat
bootstrap node
xplatform support

Signed-off-by: divo <418@cryspace.space>
2026-10-19 00:17:02 -04:00

5 lines
468 B
C

#include "sleep_proto.h"
#include <assert.h>
#include <string.h>
int main(void){sleep_metadata_header_t a,b;unsigned char buf[128];size_t n;memset(&a,0,sizeof(a));strcpy(a.type,"hyperdrive");memset(a.content,0x5a,32);a.content_len=32;assert(sleep_metadata_header_encode(&a,buf,sizeof(buf),&n)==0);assert(n==46);assert(sleep_metadata_header_decode(&b,buf,n)==0);assert(!strcmp(b.type,"hyperdrive"));assert(b.content_len==32&&!memcmp(a.content,b.content,32));return 0;}