2024-12-23 00:16:32 -07:00
|
|
|
#include "../test.h"
|
2024-12-22 23:31:37 -07:00
|
|
|
#include "arc/std/errno.h"
|
|
|
|
|
#include "arc/std/chemical.h"
|
|
|
|
|
//#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARC_TEST(Chemical_BasicTest){
|
2025-01-29 17:31:18 -07:00
|
|
|
ARC_Chemical *chemical;
|
|
|
|
|
ARC_Chemical_Create(&chemical);
|
2024-12-22 23:31:37 -07:00
|
|
|
|
2025-01-29 17:31:18 -07:00
|
|
|
ARC_CHECK(arc_errno == 0);
|
2024-12-22 23:31:37 -07:00
|
|
|
|
2025-03-08 02:30:23 -07:00
|
|
|
//char *tempCString = "int32 test = 5;";
|
|
|
|
|
char *tempCString = "group test { int32 test = 5; }";
|
|
|
|
|
//char *tempCString = "group test { }";
|
2025-03-07 14:44:04 -07:00
|
|
|
ARC_String *tempString;
|
|
|
|
|
ARC_String_CreateWithStrlen(&tempString, tempCString);
|
|
|
|
|
ARC_Chemical_LoadFromString(chemical, &tempString);
|
|
|
|
|
|
2024-12-22 23:31:37 -07:00
|
|
|
//cleanup
|
2025-01-29 17:31:18 -07:00
|
|
|
ARC_Chemical_Destroy(chemical);
|
2024-12-22 23:31:37 -07:00
|
|
|
}
|