2006-09-08 Mikael Hallendal <micke@imendio.com>
authorhallski <hallski>
Fri, 08 Sep 2006 12:29:54 +0000
changeset 170 bba590bac876
parent 169 10bcf8e0e443
child 171 118ca6c4520e
2006-09-08 Mikael Hallendal <micke@imendio.com> * tests/Makefile.am: * tests/test-parser.c: - Added, base for parser unit tests.
ChangeLog
tests/.cvsignore
tests/Makefile.am
tests/test-parser.c
--- 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  <micke@imendio.com>
+
+	* tests/Makefile.am:
+	* tests/test-parser.c:
+	- Added, base for parser unit tests.
+
 2006-09-06  Mikael Hallendal  <micke@imendio.com>
 
 	* loudmouth/lm-ssl-openssl.c: (ssl_verify_certificate):
--- 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
--- 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
--- /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 <stdlib.h>
+#include <check.h>
+
+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;
+}
+