Reformat tests
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#define MAIN_BUF_SIZE 4096
|
||||
#define TMP_BUF_SIZE 1024
|
||||
#define MAIN_BUF_SIZE 4096
|
||||
#define TMP_BUF_SIZE 1024
|
||||
|
||||
TestFuncResult test_cpath_join_path(void) {
|
||||
b8 result;
|
||||
|
||||
Str8 expected = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 out = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 tmp = wapp_str8_buf(TMP_BUF_SIZE);
|
||||
Str8 expected = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 out = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 tmp = wapp_str8_buf(TMP_BUF_SIZE);
|
||||
|
||||
wapp_str8_format(&expected, "%chome%cabdelrahman%cDocuments", WAPP_PATH_SEP, WAPP_PATH_SEP, WAPP_PATH_SEP);
|
||||
wapp_str8_format(&tmp, "%c", WAPP_PATH_SEP);
|
||||
@@ -110,8 +110,8 @@ TestFuncResult test_cpath_dirname(void) {
|
||||
b8 result;
|
||||
Str8 *output = nullptr;
|
||||
|
||||
Str8 expected = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 tmp = wapp_str8_buf(TMP_BUF_SIZE);
|
||||
Str8 expected = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 tmp = wapp_str8_buf(TMP_BUF_SIZE);
|
||||
|
||||
// CASE 1
|
||||
wapp_str8_format(&tmp, "%c", WAPP_PATH_SEP);
|
||||
@@ -123,14 +123,14 @@ TestFuncResult test_cpath_dirname(void) {
|
||||
// CASE 2
|
||||
wapp_str8_format(&expected, "%s", ".");
|
||||
|
||||
Str8 path = wapp_str8_lit("home");
|
||||
output = wapp_cpath_dirname(&arena, &path);
|
||||
result = result && output != nullptr && wapp_str8_equal(output, &expected);
|
||||
Str8 path = wapp_str8_lit("home");
|
||||
output = wapp_cpath_dirname(&arena, &path);
|
||||
result = result && output != nullptr && wapp_str8_equal(output, &expected);
|
||||
|
||||
// CASE 3
|
||||
path = wapp_str8_lit("");
|
||||
output = wapp_cpath_dirname(&arena, &path);
|
||||
result = result && output != nullptr && wapp_str8_equal(output, &expected);
|
||||
path = wapp_str8_lit("");
|
||||
output = wapp_cpath_dirname(&arena, &path);
|
||||
result = result && output != nullptr && wapp_str8_equal(output, &expected);
|
||||
|
||||
// CASE 4
|
||||
wapp_str8_format(&tmp, "%chome%ctest", WAPP_PATH_SEP, WAPP_PATH_SEP);
|
||||
@@ -160,8 +160,8 @@ TestFuncResult test_cpath_dirup(void) {
|
||||
b8 result;
|
||||
Str8 *output = nullptr;
|
||||
|
||||
Str8 expected = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 tmp = wapp_str8_buf(TMP_BUF_SIZE);
|
||||
Str8 expected = wapp_str8_buf(MAIN_BUF_SIZE);
|
||||
Str8 tmp = wapp_str8_buf(TMP_BUF_SIZE);
|
||||
|
||||
// CASE 1
|
||||
wapp_str8_format(&tmp, "%c", WAPP_PATH_SEP);
|
||||
|
||||
Reference in New Issue
Block a user