not implementing those

This commit is contained in:
2025-05-21 20:49:17 +02:00
parent 5b4a3f84e5
commit d31bc73884
3 changed files with 0 additions and 47 deletions

35
tests.c
View File

@ -1,7 +1,6 @@
#include "strops.h"
#include <stdio.h>
#include <stdlib.h>
#include <execinfo.h>
/* https://gist.githubusercontent.com/rexim/b5b0c38f53157037923e7cdd77ce685d/raw/86c3db57f485f3b6f7958f308ba7126fa81282d8/da_append.c */
#define da_append(xs, x) \
@ -217,38 +216,6 @@ int test_remove_at_pos_char() {
return ret;
}
int test_remove_at_pos_string() {
int ret = 1;
char* input;
char* expected;
char* result;
input = "NULL BRUH NULL";
expected = "NULL NULL";
result = strops_remove_at_pos_string(input, " BRUH", 4);
if (strcmp(result, expected) != 0) {
printf("test_remove_at_pos_string failed\n");
printf("Got = '%s'\nExpected = '%s'\n", result, expected);
ret = 0;
}
return ret;
}
int test_replace_at_pos_string() {
int ret = 1;
char* input;
char* expected;
char* result;
input = "What happened in Tiananmen Square in 1989";
expected = "Nothing happened in Tiananmen Square in 1989";
result = strops_replace_at_pos_string(input, "What", "Nothing", 0);
if (strcmp(result, expected) != 0) {
printf("test_replace_at_pos_string failed\n");
printf("Got = '%s'\nExpected = '%s'\n", result, expected);
ret = 0;
}
return ret;
}
int test_trim_right_whitespace() {
int ret = 1;
char* input;
@ -454,8 +421,6 @@ int main() {
da_append(&tests, test_insert_at_pos_string);
da_append(&tests, test_remove_at_pos_char);
da_append(&tests, test_remove_at_pos_string);
da_append(&tests, test_replace_at_pos_string);
da_append(&tests, test_trim_right_whitespace);
da_append(&tests, test_trim_left_whitespace);