lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r468628 - in /lucene/lucy/trunk/charmonizer: charm_test.c src/Charmonizer/Test/Headers.charm src/Charmonizer/Test/TestHandler.harm
Date Sat, 28 Oct 2006 03:55:55 GMT
Author: marvin
Date: Fri Oct 27 20:55:55 2006
New Revision: 468628

URL: http://svn.apache.org/viewvc?view=rev&rev=468628
Log:
Add tests for the Headers module.

Added:
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.charm
Modified:
    lucene/lucy/trunk/charmonizer/charm_test.c
    lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm

Modified: lucene/lucy/trunk/charmonizer/charm_test.c
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/charm_test.c?view=diff&rev=468628&r1=468627&r2=468628
==============================================================================
--- lucene/lucy/trunk/charmonizer/charm_test.c (original)
+++ lucene/lucy/trunk/charmonizer/charm_test.c Fri Oct 27 20:55:55 2006
@@ -12,6 +12,7 @@
 } TestGroup;
 TestGroup tests[] = {
     { "FuncMacro", chaz_TestHand_test_FuncMacro },
+    { "Headers", chaz_TestHand_test_Headers },
     { "Integers", chaz_TestHand_test_Integers },
     { "LargeFiles", chaz_TestHand_test_LargeFiles },
     { "UnusedVars", chaz_TestHand_test_UnusedVars },

Added: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.charm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.charm?view=auto&rev=468628
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.charm (added)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/Headers.charm Fri Oct 27 20:55:55 2006
@@ -0,0 +1,167 @@
+#define CHAZ_USE_SHORT_NAMES
+
+#include "_charm_test.h"
+#include <string.h>
+#include "Charmonizer/Test/TestHandler.h"
+
+#ifdef HAS_ASSERT_H
+  #include <assert.h>
+#endif
+#ifdef HAS_CTYPE_H
+  #include <ctype.h>
+#endif
+#ifdef HAS_ERRNO_H
+  #include <errno.h>
+#endif
+#ifdef HAS_FLOAT_H
+  #include <float.h>
+#endif
+#ifdef HAS_LIMITS_H
+  #include <limits.h>
+#endif
+#ifdef HAS_LOCALE_H
+  #include <locale.h>
+#endif
+#ifdef HAS_MATH_H
+  #include <math.h>
+#endif
+#ifdef HAS_SETJMP_H
+  #include <setjmp.h>
+#endif
+#ifdef HAS_SIGNAL_H
+  #include <signal.h>
+#endif
+#ifdef HAS_STDARG_H
+  #include <stdarg.h>
+#endif
+#ifdef HAS_STDDEF_H
+  #include <stddef.h>
+#endif
+#ifdef HAS_STDIO_H
+  #include <stdio.h>
+#endif
+#ifdef HAS_STDLIB_H
+  #include <stdlib.h>
+#endif
+#ifdef HAS_STRING_H
+  #include <string.h>
+#endif
+#ifdef HAS_TIME_H
+  #include <time.h>
+#endif
+
+#ifdef HAS_CPIO_H
+  #include <cpio.h>
+#endif
+#ifdef HAS_DIRENT_H
+  #include <dirent.h>
+#endif
+#ifdef HAS_FCNTL_H
+  #include <fcntl.h>
+#endif
+#ifdef HAS_GRP_H
+  #include <grp.h>
+#endif
+#ifdef HAS_PWD_H
+  #include <pwd.h>
+#endif
+#ifdef HAS_SYS.STAT_H
+  #include <sys.stat.h>
+#endif
+#ifdef HAS_SYS.TIMES_H
+  #include <sys.times.h>
+#endif
+#ifdef HAS_SYS.TYPES_H
+  #include <sys.types.h>
+#endif
+#ifdef HAS_SYS.UTSNAME_H
+  #include <sys.utsname.h>
+#endif
+#ifdef HAS_WAIT_H
+  #include <wait.h>
+#endif
+#ifdef HAS_TAR_H
+  #include <tar.h>
+#endif
+#ifdef HAS_TERMIOS_H
+  #include <termios.h>
+#endif
+#ifdef HAS_UNISTD_H
+  #include <unistd.h>
+#endif
+#ifdef HAS_UTIME_H
+  #include <utime.h>
+#endif
+
+#if defined(HAS_C89) || defined(HAS_C90)
+  #include <assert.h>
+  #include <ctype.h>
+  #include <errno.h>
+  #include <float.h>
+  #include <limits.h>
+  #include <locale.h>
+  #include <math.h>
+  #include <setjmp.h>
+  #include <signal.h>
+  #include <stdarg.h>
+  #include <stddef.h>
+  #include <stdio.h>
+  #include <stdlib.h>
+  #include <string.h>
+  #include <time.h>
+#endif
+
+#ifdef HAS_POSIX
+  #include <cpio.h>
+  #include <dirent.h>
+  #include <fcntl.h>
+  #include <grp.h>
+  #include <pwd.h>
+  #include <sys/stat.h>
+  #include <sys/times.h>
+  #include <sys/types.h>
+  #include <sys/utsname.h>
+  #include <sys/wait.h>
+  #include <tar.h>
+  #include <termios.h>
+  #include <unistd.h>
+  #include <utime.h>
+#endif
+
+void 
+chaz_TestHand_test_Headers(int *num_tests, int *num_passed, 
+                             int *num_failed, int *num_skipped)
+{
+    int test_num  = 0;
+    *num_tests    = 2;
+    *num_passed   = 0;
+    *num_failed   = 0;
+    *num_skipped  = *num_tests;
+
+    Assert_True(1, "Include all detected header files");
+
+    /* don't bother checking all -- just use stdio as an example */
+#ifdef HAS_STDIO_H
+    Assert_True(1, "stdio.h should have been detected");
+#else
+    Assert_True(0, "stdio.h should have been detected");
+#endif
+
+}
+
+/**
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+

Modified: lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm
URL: http://svn.apache.org/viewvc/lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm?view=diff&rev=468628&r1=468627&r2=468628
==============================================================================
--- lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm (original)
+++ lucene/lucy/trunk/charmonizer/src/Charmonizer/Test/TestHandler.harm Fri Oct 27 20:55:55
2006
@@ -29,6 +29,10 @@
     int *num_tests, int *num_passed, int *num_failed, int *num_skipped);
 
 void 
+chaz_TestHand_test_Headers(
+    int *num_tests, int *num_passed, int *num_failed, int *num_skipped);
+
+void 
 chaz_TestHand_test_Integers(
     int *num_tests, int *num_passed, int *num_failed, int *num_skipped);
 



Mime
View raw message