1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.github.maven_nar.cpptasks.msvc;
21
22 import java.io.File;
23 import java.util.Vector;
24
25 import junit.framework.TestCase;
26
27
28
29
30
31 public class TestMsvcCCompiler extends TestCase {
32 public TestMsvcCCompiler(final String name) {
33 super(name);
34 }
35
36 public void testDebug() {
37 final MsvcCCompiler compiler = MsvcCCompiler.getInstance();
38 final Vector args = new Vector();
39 final File objDir = new File("dummy");
40 compiler.setObjDir(objDir);
41 compiler.addDebugSwitch(args);
42 compiler.addPathSwitch(args);
43 assertEquals(5, args.size());
44 assertEquals("/Zi", args.elementAt(0));
45 assertEquals("/Od", args.elementAt(1));
46 assertEquals("/RTC1", args.elementAt(2));
47 assertEquals("/D_DEBUG", args.elementAt(3));
48 assertEquals("/Fd" + objDir.getAbsolutePath() + File.separator, args.elementAt(4));
49 }
50 }