You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2007/02/02 12:01:47 UTC
svn commit: r502574 - in /webservices/axis2/trunk/c/guththila/tests: om
resources/ resources/om resources/soap s test.c
Author: dinesh
Date: Fri Feb 2 03:01:45 2007
New Revision: 502574
URL: http://svn.apache.org/viewvc?view=rev&rev=502574
Log:
guththila unit tests
Added:
webservices/axis2/trunk/c/guththila/tests/resources/
webservices/axis2/trunk/c/guththila/tests/resources/om (with props)
webservices/axis2/trunk/c/guththila/tests/resources/soap (with props)
webservices/axis2/trunk/c/guththila/tests/s (with props)
webservices/axis2/trunk/c/guththila/tests/test.c
Removed:
webservices/axis2/trunk/c/guththila/tests/om
Added: webservices/axis2/trunk/c/guththila/tests/resources/om
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/tests/resources/om?view=auto&rev=502574
==============================================================================
--- webservices/axis2/trunk/c/guththila/tests/resources/om (added)
+++ webservices/axis2/trunk/c/guththila/tests/resources/om Fri Feb 2 03:01:45 2007
@@ -0,0 +1 @@
+link ../../../axiom/test/resources/xml/om/
\ No newline at end of file
Propchange: webservices/axis2/trunk/c/guththila/tests/resources/om
------------------------------------------------------------------------------
svn:special = *
Added: webservices/axis2/trunk/c/guththila/tests/resources/soap
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/tests/resources/soap?view=auto&rev=502574
==============================================================================
--- webservices/axis2/trunk/c/guththila/tests/resources/soap (added)
+++ webservices/axis2/trunk/c/guththila/tests/resources/soap Fri Feb 2 03:01:45 2007
@@ -0,0 +1 @@
+link ../../../axiom/test/resources/xml/soap
\ No newline at end of file
Propchange: webservices/axis2/trunk/c/guththila/tests/resources/soap
------------------------------------------------------------------------------
svn:special = *
Added: webservices/axis2/trunk/c/guththila/tests/s
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/tests/s?view=auto&rev=502574
==============================================================================
--- webservices/axis2/trunk/c/guththila/tests/s (added)
+++ webservices/axis2/trunk/c/guththila/tests/s Fri Feb 2 03:01:45 2007
@@ -0,0 +1,13 @@
+#!/usr/bin/perl -w
+use strict;
+
+if ($ARGV[0] == 1)
+{
+ print "compiling reader\n";
+ system "gcc -Wall -g3 -O0 -o reader test.c \-L\$AXIS2C_HOME/lib \-I\$AXIS2C_HOME/include -lcheck -lguththila \-laxis2_util";
+}
+else
+{
+ print "compiling writer\n";
+ system "gcc -Wall -g3 -O0 -o writer guththila_writer_main.c -L\$AXIS2C_HOME/lib -I\$AXIS2C_HOME/include -lguththila -laxis2_util";
+}
Propchange: webservices/axis2/trunk/c/guththila/tests/s
------------------------------------------------------------------------------
svn:executable = *
Added: webservices/axis2/trunk/c/guththila/tests/test.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/tests/test.c?view=auto&rev=502574
==============================================================================
--- webservices/axis2/trunk/c/guththila/tests/test.c (added)
+++ webservices/axis2/trunk/c/guththila/tests/test.c Fri Feb 2 03:01:45 2007
@@ -0,0 +1,58 @@
+#include <check.h>
+#include <guththila.h>
+#include "guththila_defines.h"
+
+axis2_allocator_t *allocator;
+guththila_reader_t *red;
+axis2_env_t *environment;
+guththila_t *parser;
+
+void
+setup (void)
+{
+allocator = axis2_allocator_init(NULL);
+environment = axis2_env_create(allocator);
+}
+
+void
+teardown (void)
+{
+ guththila_reader_free(environment, red);
+ guththila_free(environment, parser);
+ axis2_env_free(environment);
+}
+
+START_TEST (test_guththila)
+{
+ red = guththila_reader_create_for_file(environment, "resources/om/axis.xml");
+ parser = guththila_create(environment, red);
+ fail_if (red == NULL, "guththila reader failed");
+ fail_if (parser == NULL, "guththila parser failed");
+}
+END_TEST
+
+Suite *
+guththila_suite (void)
+{
+ Suite *s = suite_create ("Guththila");
+
+ /* Core test case */
+ TCase *tc_core = tcase_create ("Core");
+ tcase_add_checked_fixture (tc_core, setup, teardown);
+ tcase_add_test (tc_core, test_guththila);
+ suite_add_tcase (s, tc_core);
+ return s;
+}
+
+
+int
+main (void)
+{
+ int number_failed;
+ Suite *s = guththila_suite ();
+ SRunner *sr = srunner_create (s);
+ srunner_run_all (sr, CK_NORMAL);
+ number_failed = srunner_ntests_failed (sr);
+ srunner_free (sr);
+ return (number_failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org