all unit tests migrated to meson

This commit is contained in:
bjt-user 2024-11-17 10:10:52 +01:00
parent 28d6710c0a
commit 7bef5ea855
3 changed files with 9 additions and 19 deletions

View File

@ -1,17 +0,0 @@
CC = gcc
CFLAGS = -Wall -g -O0
test_parse_ics_file:
$(CC) $(CFLAGS) test_parse_ics_file.c ../src/parse_ics.c ../src/string_handling.c ../src/list_handling.c ../src/date_time_handling.c ../src/read_until_string.c ../src/read_until_nl.c -o test_parse_ics_file.out
./test_parse_ics_file.out
test_print_upcoming:
$(CC) $(CFLAGS) test_print_upcoming.c ../src/parse_ics.c ../src/string_handling.c ../src/list_handling.c ../src/date_time_handling.c ../src/read_until_string.c ../src/read_until_nl.c -o test_print_upcoming.out
./test_print_upcoming.out
test_pretty_print_date_time:
$(CC) $(CFLAGS) test_pretty_print_date_time.c ../src/string_handling.c ../src/date_time_handling.c ../src/read_until_string.c ../src/read_until_nl.c -o test_pretty_print_date_time.out
.PHONY:clean
clean:
-rm -vf *.out

View File

@ -9,3 +9,8 @@ t2e = executable('test_pretty_print_date_time', 'test_pretty_print_date_time.c',
'../src/date_time_handling.c', '../src/read_until_string.c', '../src/read_until_nl.c')
test('test pretty_print_date_time', t2e)
t3e = executable('test_parse_ics_file', 'test_parse_ics_file.c', '../src/parse_ics.c', '../src/string_handling.c', '../src/list_handling.c', \
'../src/date_time_handling.c', '../src/read_until_string.c', '../src/read_until_nl.c')
test('test parse_ics_file', t3e)

View File

@ -6,7 +6,9 @@ int main() {
// initialize empty list
struct event *head = NULL;
parse_ics_file("../tests/calendar.ics", &head);
parse_ics_file("../../tests/calendar.ics", &head);
parse_ics_file("../tests/failed_cal.ics", &head);
parse_ics_file("../../tests/failed_cal.ics", &head);
return 0;
}