Merge pull request #13 from Timerix22/main

merge changes from 'main'
This commit is contained in:
Timerix22
2022-11-15 12:25:47 +06:00
committed by GitHub
55 changed files with 615 additions and 423 deletions

View File

@@ -20,9 +20,8 @@ int main(){
ktDescriptors_initKerepTypes();
ktDescriptors_endInit();
kprintf("\e[97mkerep tests are starting!\n");
//optime("test_all",1,test_all());
optime("test_all",1,test_all());
ktDescriptors_free();
kprintf("ъъъъ");
kprintf("\e[0m\n");
return 0;
}

View File

@@ -18,7 +18,7 @@ void print_dtsod(Hashtable* dtsod){
kprintf("\e[92m");
Hashtable_foreach(dtsod, p,({
printkvp(p);
if(p.value.typeId==ktId_HashtablePtr){
if(p.value.typeId==ktid_ptrName(Hashtable)){
kprintf(": {\n");
Hashtable* sub=p.value.VoidPtr;
Hashtable_foreach(sub, _p,({

View File

@@ -4,7 +4,7 @@ EXPORT void CALL test_marshalling(char* text, KVPair** kptr){
KVPair* k=malloc(sizeof(KVPair));
k->key="message";
char* tc=cptr_copy(text);
Unitype u=UniHeap(ktId_CharPtr,tc);
Unitype u=UniHeapPtr(char,tc);
k->value=u;
*kptr=k;
}

View File

@@ -44,11 +44,11 @@ void test_searchtree(){
printuni(u);
ST_push(node,"channel_id", u);
kprintf(" -> channel_id\n ");
u=UniHeap(ktId_CharPtr, cptr_copy("32.2004"));
u=UniHeapPtr(char, cptr_copy("32.2004"));
printuni(u);
ST_push(node,"message_id", u);
kprintf(" -> message_id\n ");
u=UniStack(ktId_CharPtr,"some text UwU");
u=UniStackPtr(char,"some text UwU");
printuni(u);
ST_push(node,"text", u);
kprintf(" -> text\n");