X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/7bef9a814dacda99e7bff6d2374b76a48bc13002..a53aa4647b26ef8543a45f1410f42123717d447f:/emufs/b_plus_test.c?ds=sidebyside diff --git a/emufs/b_plus_test.c b/emufs/b_plus_test.c index a06eadd..8680d73 100644 --- a/emufs/b_plus_test.c +++ b/emufs/b_plus_test.c @@ -3,11 +3,22 @@ int main(int argc, char* argv[]) { +/* Locals */ +INDEX_DAT querydata; + /* Creamos un handler EMUFS, luego un Indice B+ y testing... */ -EMUFS *emu = emufs_crear("testbplus",T3,512, 128); -INDICE *indice = emufs_indice_crear(emu,"principal",0,0,0,0,sizeof(int)*12); -emufs_b_plus_crear(indice); -printf ("Yeiiiii\n"); +INDEXSPECS indice; +indice.tam_bloque = SIZE_B_PLUS_HEADER + sizeof(int)*4 + sizeof(int)*5; +indice.size_claves = (indice.tam_bloque - SIZE_B_PLUS_HEADER - sizeof(int))/2; +indice.size_hijos = indice.size_claves + sizeof(int); +indice.filename = "idxbplus_primary.idx"; +emufs_b_plus_crear(&indice); + +/* Pedimos al arbol el nro de bloque donde guardar la clave 5. Should */ +/* return -1 pues solo esta la raiz.. */ +querydata.num_bloque = -666; +querydata.clave.i_clave = 5; +emufs_b_plus_get_bloque(&indice,&querydata); return 0;