# HG changeset patch # User hallski # Date 1157718594 0 # Node ID bba590bac8765b5c691270c1639b0bdbd4ea355f # Parent 10bcf8e0e4430f7f1ec1db61c8b00a42fb8c4da7 2006-09-08 Mikael Hallendal * tests/Makefile.am: * tests/test-parser.c: - Added, base for parser unit tests. diff -r 10bcf8e0e443 -r bba590bac876 ChangeLog --- a/ChangeLog Wed Sep 06 14:48:17 2006 +0000 +++ b/ChangeLog Fri Sep 08 12:29:54 2006 +0000 @@ -1,3 +1,9 @@ +2006-09-08 Mikael Hallendal + + * tests/Makefile.am: + * tests/test-parser.c: + - Added, base for parser unit tests. + 2006-09-06 Mikael Hallendal * loudmouth/lm-ssl-openssl.c: (ssl_verify_certificate): diff -r 10bcf8e0e443 -r bba590bac876 tests/.cvsignore --- a/tests/.cvsignore Wed Sep 06 14:48:17 2006 +0000 +++ b/tests/.cvsignore Fri Sep 08 12:29:54 2006 +0000 @@ -1,5 +1,6 @@ Makefile Makefile.in test-objects +test-parser .deps .libs diff -r 10bcf8e0e443 -r bba590bac876 tests/Makefile.am --- a/tests/Makefile.am Wed Sep 06 14:48:17 2006 +0000 +++ b/tests/Makefile.am Fri Sep 08 12:29:54 2006 +0000 @@ -1,10 +1,14 @@ TESTS = \ - test-objects + test-objects \ + test-parser test_objects_SOURCES = \ test-objects.c \ test-objects.h +test_parser_SOURCES = \ + test-parser.c + if HAVE_CHECK noinst_PROGRAMS = $(TESTS) endif diff -r 10bcf8e0e443 -r bba590bac876 tests/test-parser.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-parser.c Fri Sep 08 12:29:54 2006 +0000 @@ -0,0 +1,47 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2006 Imendio AB + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include + +static Suite * +create_lm_parser_suite () +{ + Suite *suite; + + suite = suite_create ("LmParser"); + + return suite; +} + +int +main (int argc, char **argv) +{ + SRunner *srunner; + int nf; + + srunner = srunner_create (create_lm_parser_suite ()); + + srunner_run_all (srunner, CK_NORMAL); + nf = srunner_ntests_failed (srunner); + + return (nf == 0) ? EXIT_SUCCESS : EXIT_FAILURE; +} +