summaryrefslogtreecommitdiffstats
path: root/src/test/java/net/sf
diff options
context:
space:
mode:
authordarius42 <[email protected]>2007-08-22 21:08:36 +0000
committerdarius42 <[email protected]>2007-08-22 21:08:36 +0000
commitb8f9c2efe5a0b11db7a644b20b7d311da0cd02fa (patch)
tree85828395e66542aa9d031601dfee1ba8b5be593d /src/test/java/net/sf
parentc48b163f7332a86faaa42b7e962fb166206ca7e5 (diff)
Update for bug 1715475. Extended the file types that will be bid on by the CC, aCC, and xlC compilers so that it will include '.s' files.
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/cpptasks/trunk@139 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'src/test/java/net/sf')
-rw-r--r--src/test/java/net/sf/antcontrib/cpptasks/TestAllClasses.java5
-rw-r--r--src/test/java/net/sf/antcontrib/cpptasks/hp/TestaCCCompiler.java93
-rw-r--r--src/test/java/net/sf/antcontrib/cpptasks/ibm/TestVisualAgeCCompiler.java68
-rw-r--r--src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java73
4 files changed, 238 insertions, 1 deletions
diff --git a/src/test/java/net/sf/antcontrib/cpptasks/TestAllClasses.java b/src/test/java/net/sf/antcontrib/cpptasks/TestAllClasses.java
index de6c491..e85fe27 100644
--- a/src/test/java/net/sf/antcontrib/cpptasks/TestAllClasses.java
+++ b/src/test/java/net/sf/antcontrib/cpptasks/TestAllClasses.java
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2002-2004 The Ant-Contrib project
+ * Copyright 2002-2007 The Ant-Contrib project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -56,5 +56,8 @@ public class TestAllClasses extends TestSuite {
addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestAbstractArLibrarian.class);
addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestGccLinker.class);
addTestSuite(net.sf.antcontrib.cpptasks.gcc.TestGccLinker.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.sun.TestForteCCCompiler.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.hp.TestaCCCompiler.class);
+ addTestSuite(net.sf.antcontrib.cpptasks.ibm.TestVisualAgeCCompiler.class);
}
}
diff --git a/src/test/java/net/sf/antcontrib/cpptasks/hp/TestaCCCompiler.java b/src/test/java/net/sf/antcontrib/cpptasks/hp/TestaCCCompiler.java
new file mode 100644
index 0000000..073463e
--- /dev/null
+++ b/src/test/java/net/sf/antcontrib/cpptasks/hp/TestaCCCompiler.java
@@ -0,0 +1,93 @@
+/*
+ *
+ * Copyright 2002-2007 The Ant-Contrib project
+ *
+ * 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.
+ */
+package net.sf.antcontrib.cpptasks.hp;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+/**
+ * Test HP aCC compiler adapter
+ *
+ */
+// TODO Since aCCCompiler extends GccCompatibleCCompiler, this test
+// should probably extend TestGccCompatibleCCompiler.
+public class TestaCCCompiler extends TestCase {
+ public TestaCCCompiler(String name) {
+ super(name);
+ }
+ public void testBidC() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.c"));
+ }
+ public void testBidCpp() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.C"));
+ }
+ public void testBidCpp2() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cc"));
+ }
+ public void testBidCpp3() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.CC"));
+ }
+ public void testBidCpp4() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cxx"));
+ }
+ public void testBidCpp5() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.CXX"));
+ }
+ public void testBidCpp6() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cpp"));
+ }
+ public void testBidCpp7() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.CPP"));
+ }
+ public void testBidCpp8() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.c++"));
+ }
+ public void testBidCpp9() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.C++"));
+ }
+ public void testBidPreprocessed() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.i"));
+ }
+ public void testBidAssembly() {
+ aCCCompiler compiler = aCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.s"));
+ }
+}
diff --git a/src/test/java/net/sf/antcontrib/cpptasks/ibm/TestVisualAgeCCompiler.java b/src/test/java/net/sf/antcontrib/cpptasks/ibm/TestVisualAgeCCompiler.java
new file mode 100644
index 0000000..62a513e
--- /dev/null
+++ b/src/test/java/net/sf/antcontrib/cpptasks/ibm/TestVisualAgeCCompiler.java
@@ -0,0 +1,68 @@
+/*
+ *
+ * Copyright 2002-2007 The Ant-Contrib project
+ *
+ * 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.
+ */
+package net.sf.antcontrib.cpptasks.ibm;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+/**
+ * Test IBM Visual Age compiler adapter
+ *
+ */
+// TODO Since VisualAgeCCompiler extends GccCompatibleCCompiler, this test
+// should probably extend TestGccCompatibleCCompiler.
+public class TestVisualAgeCCompiler extends TestCase {
+ public TestVisualAgeCCompiler(String name) {
+ super(name);
+ }
+ public void testBidC() {
+ VisualAgeCCompiler compiler = VisualAgeCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.c"));
+ }
+ public void testBidCpp() {
+ VisualAgeCCompiler compiler = VisualAgeCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.C"));
+ }
+ public void testBidCpp2() {
+ VisualAgeCCompiler compiler = VisualAgeCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cc"));
+ }
+ public void testBidCpp3() {
+ VisualAgeCCompiler compiler = VisualAgeCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cxx"));
+ }
+ public void testBidCpp4() {
+ VisualAgeCCompiler compiler = VisualAgeCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cpp"));
+ }
+ public void testBidPreprocessed() {
+ VisualAgeCCompiler compiler = VisualAgeCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.i"));
+ }
+ public void testBidAssembly() {
+ VisualAgeCCompiler compiler = VisualAgeCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.s"));
+ }
+}
diff --git a/src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java b/src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java
new file mode 100644
index 0000000..0fa3297
--- /dev/null
+++ b/src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java
@@ -0,0 +1,73 @@
+/*
+ *
+ * Copyright 2002-2007 The Ant-Contrib project
+ *
+ * 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.
+ */
+package net.sf.antcontrib.cpptasks.sun;
+import java.util.Vector;
+
+import junit.framework.TestCase;
+
+import net.sf.antcontrib.cpptasks.compiler.AbstractProcessor;
+/**
+ * Test Sun Forte compiler adapter
+ *
+ */
+// TODO Since ForteCCCompiler extends GccCompatibleCCompiler, this test
+// should probably extend TestGccCompatibleCCompiler.
+public class TestForteCCCompiler extends TestCase {
+ public TestForteCCCompiler(String name) {
+ super(name);
+ }
+ public void testBidC() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.c"));
+ }
+ public void testBidCpp() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.C"));
+ }
+ public void testBidCpp2() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cc"));
+ }
+ public void testBidCpp3() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cxx"));
+ }
+ public void testBidCpp4() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.cpp"));
+ }
+ public void testBidCpp5() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.c++"));
+ }
+ public void testBidPreprocessed() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.i"));
+ }
+ public void testBidAssembly() {
+ ForteCCCompiler compiler = ForteCCCompiler.getInstance();
+ assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler
+ .bid("foo.s"));
+ }
+}