[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add multiple language testcase
From: |
Paolo Bonzini |
Subject: |
[PATCH] Add multiple language testcase |
Date: |
Thu, 16 Oct 2008 10:42:44 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
Much to my surprise, the only testcase that tries using multiple
languages in the Autoconf testsuite is... the Libtool integration test!
And I'm not even sure it does with Libtool 2.x.
So, I'm pushing this one.
Paolo
2008-10-15 Paolo Bonzini <address@hidden>
* tests/compile.at (Multiple languages): New.
diff --git a/tests/compile.at b/tests/compile.at
index 715fde8..6ee22ae 100644
--- a/tests/compile.at
+++ b/tests/compile.at
@@ -150,3 +150,41 @@ AT_CHECK_MACRO([AC_TRY_LINK_FUNC],
[AC_MSG_ERROR([cannot find `printf'])])
AC_TRY_LINK_FUNC(Be_doomed_if_your_libc_has_a_function_named_like_this,
[AC_MSG_ERROR([found a nonexistent function])])])
+
+## -------------------- ##
+## Multiple languages. ##
+## -------------------- ##
+
+AT_SETUP([Multiple languages])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+
+AC_PROG_CC
+AC_PROG_CXX
+
+AC_LANG_PUSH(C)
+AC_MSG_CHECKING([a simple C program that is not valid C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([enum a { A, B, C };
+ enum a f(enum a in) { return in++; }], [])],
+ [AC_MSG_RESULT([ok])],
+ [AC_MSG_RESULT([failed])
+ AC_MSG_ERROR([could not compile test program])])
+AC_LANG_POP(C)
+
+AC_LANG_PUSH(C++)
+AC_MSG_CHECKING([a simple C++ program that is not valid C])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([class A {};], [])],
+ [AC_MSG_RESULT([ok])],
+ [AC_MSG_RESULT([failed])
+ AC_MSG_ERROR([could not compile test program])])
+
+AC_CHECK_HEADER([cstring])
+AC_LANG_POP(C++)
+]])
+
+AT_CHECK_AUTOCONF
+AT_CHECK_CONFIGURE([-q])
+
+AT_CLEANUP
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Add multiple language testcase,
Paolo Bonzini <=