Files
2026-05-03 20:07:16 +03:00

27 lines
684 B
C

#define EV_STR_IMPLEMENTATION
#include "ev_str.h"
#include <assert.h>
#include <string.h>
static evstring global_str = evstr("Global 'Hello, World!'");
int main(void)
{
const evstring stack_str = evstr("Stack 'Hello, World!'");
assert(strcmp(stack_str, "Stack 'Hello, World!'") == 0);
assert(evstring_getLength(stack_str) == 21);
assert(strcmp(global_str, "Global 'Hello, World!'") == 0);
assert(evstring_getLength(global_str) == 22);
evstring heap_str = evstring_new("Heap 'Hello, World!'");
assert(heap_str != NULL);
assert(strcmp(heap_str, "Heap 'Hello, World!'") == 0);
assert(evstring_getLength(heap_str) == 20);
evstring_free(heap_str);
return 0;
}