diff options
author | darius42 <[email protected]> | 2007-08-22 23:50:24 +0000 |
---|---|---|
committer | darius42 <[email protected]> | 2007-08-22 23:50:24 +0000 |
commit | 1cde7e1f0247afc51e2204b1115641c83db3c60a (patch) | |
tree | 6178426f2cfacdd092d077b08b6b6ac63c8b6dbc /src/test/java/net/sf | |
parent | b8f9c2efe5a0b11db7a644b20b7d311da0cd02fa (diff) |
Update for bug 1775873. Modify the warning levels for Sunpro to provide finer grain control over the flags that are used.
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/cpptasks/trunk@140 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'src/test/java/net/sf')
-rw-r--r-- | src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java b/src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java index 0fa3297..df08539 100644 --- a/src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java +++ b/src/test/java/net/sf/antcontrib/cpptasks/sun/TestForteCCCompiler.java @@ -70,4 +70,63 @@ public class TestForteCCCompiler extends TestCase { assertEquals(AbstractProcessor.DEFAULT_PROCESS_BID, compiler .bid("foo.s")); } + /** + * Tests command line switches for warning = 0 + */ + public void testWarningLevel0() { + ForteCCCompiler compiler = ForteCCCompiler.getInstance(); + Vector args = new Vector(); + compiler.addWarningSwitch(args, 0); + assertEquals(1, args.size()); + assertEquals("-w", args.elementAt(0)); + } + /** + * Tests command line switches for warning = 1 + */ + public void testWarningLevel1() { + ForteCCCompiler compiler = ForteCCCompiler.getInstance(); + Vector args = new Vector(); + compiler.addWarningSwitch(args, 1); + assertEquals(0, args.size()); + } + /** + * Tests command line switches for warning = 2 + */ + public void testWarningLevel2() { + ForteCCCompiler compiler = ForteCCCompiler.getInstance(); + Vector args = new Vector(); + compiler.addWarningSwitch(args, 2); + assertEquals(0, args.size()); + } + /** + * Tests command line switches for warning = 3 + */ + public void testWarningLevel3() { + ForteCCCompiler compiler = ForteCCCompiler.getInstance(); + Vector args = new Vector(); + compiler.addWarningSwitch(args, 3); + assertEquals(1, args.size()); + assertEquals("+w", args.elementAt(0)); + } + /** + * Tests command line switches for warning = 4 + */ + public void testWarningLevel4() { + ForteCCCompiler compiler = ForteCCCompiler.getInstance(); + Vector args = new Vector(); + compiler.addWarningSwitch(args, 4); + assertEquals(1, args.size()); + assertEquals("+w2", args.elementAt(0)); + } + /** + * Tests command line switches for warning = 5 + */ + public void testWarningLevel5() { + ForteCCCompiler compiler = ForteCCCompiler.getInstance(); + Vector args = new Vector(); + compiler.addWarningSwitch(args, 5); + assertEquals(2, args.size()); + assertEquals("+w2", args.elementAt(0)); + assertEquals("-xwe", args.elementAt(1)); + } } |