From 91f3604772158a2ff8c17fb74459088004e4fe15 Mon Sep 17 00:00:00 2001 From: AnonymusRaccoon Date: Wed, 4 Mar 2020 12:20:40 +0100 Subject: [PATCH] Making tests works --- Makefile | 2 +- include/my.h | 2 ++ tests/tests_realxml.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 97c8265..243e400 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ INCLUDE = -I ./include CFLAGS = $(INCLUDE) -Wall -Wextra -Wshadow -LDFLAGS = -lmy -L ../my +LDFLAGS = -lmy -L ../my -lm CC = gcc diff --git a/include/my.h b/include/my.h index 723267c..f15b49d 100644 --- a/include/my.h +++ b/include/my.h @@ -6,6 +6,8 @@ */ #pragma once +char *my_str_replace(char *str, const char *to_replace, char c); + int my_str_islower_or_num(const char *str); int count_valid_queens_placements(int n); diff --git a/tests/tests_realxml.c b/tests/tests_realxml.c index 3410c74..a23011f 100644 --- a/tests/tests_realxml.c +++ b/tests/tests_realxml.c @@ -38,7 +38,7 @@ Test(xml, completewstring) cr_assert_eq(n->child->properties, NULL); cr_assert_eq(n->child->next, NULL); cr_assert_str_eq(n->child->child->name, "pos"); - cr_assert_str_eq(n->child->child->child->properties->value, "5,5"); + cr_assert_str_eq(n->child->child->child->properties->value, "5, 5"); cr_assert_str_eq(n->child->child->next->name, "size"); cr_assert_str_eq(n->child->child->next->properties->key, "x"); cr_assert_str_eq(n->child->child->next->properties->value, "500");