diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cyn/file.c | 1 | ||||
-rw-r--r-- | tests/cyn/log.c | 2 | ||||
-rw-r--r-- | tests/d/test.c | 6 | ||||
-rw-r--r-- | tests/un/allocs.c | 2 | ||||
-rw-r--r-- | tests/un/math.c | 2 | ||||
-rw-r--r-- | tests/un/mathd.c | 1 | ||||
-rw-r--r-- | tests/un/mathf.c | 1 | ||||
-rw-r--r-- | tests/un/matrix.c | 1 | ||||
-rw-r--r-- | tests/un/strings.c | 2 | ||||
-rw-r--r-- | tests/un/win_wstr.c | 3 |
10 files changed, 15 insertions, 6 deletions
diff --git a/tests/cyn/file.c b/tests/cyn/file.c index 7767f7a..a847c1d 100644 --- a/tests/cyn/file.c +++ b/tests/cyn/file.c @@ -1,6 +1,7 @@ #include <cynic.h> int main(void) { + un_init(UN_KB(4)); // cyn_log_write(CYN_LOG_INFO, UN_STR("Size of it is: %l"), sizeof(File_Handle)); File_Handle file = cyn_file_open(UN_STR("Ligma.png")); } diff --git a/tests/cyn/log.c b/tests/cyn/log.c index 067d557..9a61bef 100644 --- a/tests/cyn/log.c +++ b/tests/cyn/log.c @@ -1,7 +1,7 @@ #include <cynic.h> int main(void) { - un_alloc_temp_init(UN_KB(4)); + un_init(UN_KB(4)); cyn_log_write(CYN_LOG_INFO, UN_STR("Hello %u %d %s!"), (u64)100, (s64)-400, UN_STR("World")); } diff --git a/tests/d/test.c b/tests/d/test.c index 554926c..6e6442b 100644 --- a/tests/d/test.c +++ b/tests/d/test.c @@ -2,11 +2,13 @@ int main(void) { - un_alloc_temp_init(UN_KB(4)); + un_init(UN_KB(4)); d_init(); - cyn_log_write(CYN_LOG_INFO, d_get_hostname_ip(UN_STR("f-tier-games.ru"), un_alloc_temp_get())); + String host = UN_STR("f-tier-games.ru"); + + cyn_log_write(CYN_LOG_INFO, UN_STR("%s: %s"), host, d_hostname_ip_get(host, un_alloc_temp_get())); return 0; } diff --git a/tests/un/allocs.c b/tests/un/allocs.c index 220c2c8..36e75fa 100644 --- a/tests/un/allocs.c +++ b/tests/un/allocs.c @@ -4,7 +4,7 @@ int main(void) { u64 i, size, *value; size = UN_KB(1); - un_alloc_temp_init(UN_KB(4)); + un_init(UN_MB(4)); { // std Allocator std = un_alloc_std_get(); diff --git a/tests/un/math.c b/tests/un/math.c index 87bea6b..94d3b11 100644 --- a/tests/un/math.c +++ b/tests/un/math.c @@ -1,6 +1,8 @@ #include <ungrateful.h> int main() { + un_init(UN_MB(4)); + // Lerping { double d; diff --git a/tests/un/mathd.c b/tests/un/mathd.c index 10ef24b..879cb89 100644 --- a/tests/un/mathd.c +++ b/tests/un/mathd.c @@ -1,6 +1,7 @@ #include <ungrateful.h> int main() { + un_init(UN_MB(4)); /* 2d */ { double2 a = {1.0, 2.0}; diff --git a/tests/un/mathf.c b/tests/un/mathf.c index 5b8d4c1..3d736af 100644 --- a/tests/un/mathf.c +++ b/tests/un/mathf.c @@ -1,6 +1,7 @@ #include <ungrateful.h> int main() { + un_init(UN_MB(4)); /* 2d */ { float2 a = { 1.0f, 2.0f }; diff --git a/tests/un/matrix.c b/tests/un/matrix.c index 60fd9a5..d5b3e22 100644 --- a/tests/un/matrix.c +++ b/tests/un/matrix.c @@ -1,5 +1,6 @@ #include <ungrateful.h> int main() { + un_init(UN_MB(4)); return 0; } diff --git a/tests/un/strings.c b/tests/un/strings.c index 72d84ad..90365b6 100644 --- a/tests/un/strings.c +++ b/tests/un/strings.c @@ -5,7 +5,7 @@ int main(void) { Allocator alloc; String result; - un_alloc_temp_init(UN_MB(4)); + un_init(UN_MB(4)); alloc = un_alloc_temp_get(); diff --git a/tests/un/win_wstr.c b/tests/un/win_wstr.c index 51fc820..1bc78bf 100644 --- a/tests/un/win_wstr.c +++ b/tests/un/win_wstr.c @@ -1,4 +1,5 @@ #include <ungrateful.h> + #if !defined(OS_WINDOWS) int main(void) { return 0; @@ -11,7 +12,7 @@ int main(void) { int main(void) { wchar *caption, *text; - un_alloc_temp_init(UN_KB(4)); + un_init(UN_MB(4)); Allocator talloc = un_alloc_temp_get(); |