[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/5] objc++: add first tests
From: |
Stefano Lattarini |
Subject: |
[PATCH 5/5] objc++: add first tests |
Date: |
Fri, 27 Apr 2012 10:19:29 +0200 |
From: Peter Breitenlohner <address@hidden>
* t/objcxx-basic.test: New test.
* t/objcxx-demo.test: Likewise.
* t/list-of-tests.mk: Add them.
Signed-off-by: Peter Breitenlohner <address@hidden>
Signed-off-by: Stefano Lattarini <address@hidden>
---
t/list-of-tests.mk | 2 ++
t/objcxx-basic.sh | 37 +++++++++++++++++++++++++++++++
t/objcxx-demo.sh | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 100 insertions(+)
create mode 100755 t/objcxx-basic.sh
create mode 100755 t/objcxx-demo.sh
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index fef7165..acc8e06 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -703,6 +703,8 @@ t/notrans.sh \
t/number.sh \
t/objc.sh \
t/objc2.sh \
+t/objcxx-basic.sh \
+t/objcxx-demo.sh \
t/objext-pr10128.sh \
t/obsolete.sh \
t/oldvars.sh \
diff --git a/t/objcxx-basic.sh b/t/objcxx-basic.sh
new file mode 100755
index 0000000..ae0f969
--- /dev/null
+++ b/t/objcxx-basic.sh
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, 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 General Public License for more details.
+#
+
+# Basic tests on the Objective C++ support that don't actually
+# require an Objective-C++ compiler.
+
+. ./defs || Exit 1
+
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = hello
+hello_SOURCES = hello.mm
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'OBJCXX.* undefined' stderr
+grep 'add .*AC_PROG_OBJCXX' stderr
+
+echo AC_PROG_OBJCXX >> configure.ac
+$ACLOCAL --force
+$AUTOMAKE
+
+$EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
+
+:
diff --git a/t/objcxx-demo.sh b/t/objcxx-demo.sh
new file mode 100755
index 0000000..7af089f
--- /dev/null
+++ b/t/objcxx-demo.sh
@@ -0,0 +1,61 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Demo package using Objective C++ and doing distcheck.
+
+required='cc c++'
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_OBJC
+AC_PROG_OBJCXX
+AC_CONFIG_HEADERS([config.h])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = play
+play_SOURCES = play.c playxx.cxx playobjc.m playobjcxx.mm
+END
+
+cat > play.c << 'END'
+#include <config.h>
+#include <stdio.h>
+int main (void)
+{
+ printf("Hello, world! (" PACKAGE_STRING ")\n");
+ return 0;
+}
+END
+
+echo '//' >> playxx.cxx
+
+echo '/* */' >> playobjc.m
+
+echo '//' >> playobjcxx.mm
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+$MAKE distcheck
+
+:
--
1.7.9.5
- [SPAM] Re: ObjC++ integration (was: Re: bug#11346: automake-1.12 - one test fails (due to truncated timestamp), (continued)
- [SPAM] Re: ObjC++ integration (was: Re: bug#11346: automake-1.12 - one test fails (due to truncated timestamp), Peter Breitenlohner, 2012/04/26
- [PATCH 0/5] Add Objective C++ support in Automake, Stefano Lattarini, 2012/04/27
- [PATCH 2/5] objc++: add documentation, Stefano Lattarini, 2012/04/27
- [PATCH 4/5] news: announce initial support for Objective C++, Stefano Lattarini, 2012/04/27
- [PATCH 1/5] objc++: initial support for Objective C++, Stefano Lattarini, 2012/04/27
- Re: [PATCH 1/5] objc++: initial support for Objective C++, Stefano Lattarini, 2012/04/30
- Re: [PATCH 1/5] objc++: initial support for Objective C++, Peter Breitenlohner, 2012/04/30
- Re: [PATCH 1/5] objc++: initial support for Objective C++, Stefano Lattarini, 2012/04/30
- [PATCH 5/5] objc++: add first tests,
Stefano Lattarini <=
- Re: [PATCH 5/5] objc++: add first tests, Stefano Lattarini, 2012/04/27
- Re: [PATCH 5/5] objc++: add first tests, Peter Breitenlohner, 2012/04/27
- Re: [PATCH 5/5] objc++: add first tests, Stefano Lattarini, 2012/04/27