Moved tests + Added more tests + Added memory testing to actions
Run tests / Run tests (push) Failing after 6s
Run tests / Run tests (push) Failing after 6s
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#define EV_STR_IMPLEMENTATION
|
||||
#include "ev_str.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
evstring heap_str = evstring_new("Heap 'Hello, World!'");
|
||||
assert(heap_str != NULL);
|
||||
|
||||
evstring_error_t res = evstring_push(&heap_str, "%.05f", 1.0f);
|
||||
assert(res == EV_STR_ERR_NONE);
|
||||
assert(evstring_getLength(heap_str) == 27);
|
||||
assert(strcmp(heap_str, "Heap 'Hello, World!'1.00000") == 0);
|
||||
|
||||
res = evstring_push(&heap_str, "Something");
|
||||
assert(res == EV_STR_ERR_NONE);
|
||||
assert(evstring_getLength(heap_str) == 36);
|
||||
assert(strcmp(heap_str, "Heap 'Hello, World!'1.00000Something") == 0);
|
||||
|
||||
evstring_free(heap_str);
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user