public void TestDebugSymbolsTrue()
        {
            // Verify each of the DebugType settings when EmitDebugInformation is true
            MyManagedCompiler m = new MyManagedCompiler();

            m.DebugType            = "Full";
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see only /debug+ on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == true, "Expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // Expect to only find Full on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == true, "Expected to find /debug:Full on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == false, "Not expected to find /debug:PdbOnly on the commandline");

            m                      = new MyManagedCompiler();
            m.DebugType            = "PdbOnly";
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see only /debug+ on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == true, "Expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // Expect to find only PdbOnly on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == true, "Expected to find /debug:PdbOnly on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == false, "Not expected to find /debug:Full on the commandline");

            m                      = new MyManagedCompiler();
            m.DebugType            = "none";
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see /debug- on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == true, "Expected to find /debug- on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            // We do not expect to see any /debug: on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");

            m                      = new MyManagedCompiler();
            m.DebugType            = null;
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see only /debug+ on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == true, "Expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // We expect to not find any /debug: on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");
        }
        public void TestDebugSymbolsNull()
        {
            MyManagedCompiler m = new MyManagedCompiler();

            m.DebugType = "Full";
            m.AddResponseFileCommands();
            // We expect to not see /debug + or -
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            // We expect to find /debug:Full
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == true, "Expected to find /debug:Full on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == false, "Not expected to find /debug:PdbOnly on the commandline");

            m           = new MyManagedCompiler();
            m.DebugType = "PdbOnly";
            m.AddResponseFileCommands();
            // We do not expect to see /debug + or -
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            // We expect to find /debug:PdbOnly
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == true, "Expected to find /debug:PdbOnly on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == false, "Not expected to find /debug:Full on the commandline");

            m           = new MyManagedCompiler();
            m.DebugType = "none";
            m.AddResponseFileCommands();
            // We expect to see /debug- on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == true, "Expected to find /debug- on the commandline");
            // We do not expect to see any /debug: on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");

            // The cases where DebugType and DebugSymbols are Blank(not set) is a special case because in microsoft.common.targets
            // when the configuration is "debug" and both DebugType and DebugSymbols are blank DebugSymbols will be set to True.
            // In relase the DebugSymbols will remail blank
            // Debug:   Blank              Blank       /debug+ //Microsof.common.targets will set DebugSymbols to true.
            // This makes the case equal to the testing of EmitDebugSymbols=true and DebugType=null which is done in TestDebugSymbolsTrue above.
            // Release: Blank              Blank       "Nothing for either switch"
            m           = new MyManagedCompiler();
            m.DebugType = null;
            m.AddResponseFileCommands();
            // We do not expect to find /debug+ or /debug-
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // We do not expect to find /debug:
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");
        }
        public void TestDebugSymbolsTrue()
        {
            // Verify each of the DebugType settings when EmitDebugInformation is true
            MyManagedCompiler m = new MyManagedCompiler();
            m.DebugType = "Full";
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see only /debug+ on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == true, "Expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // Expect to only find Full on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == true, "Expected to find /debug:Full on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == false, "Not expected to find /debug:PdbOnly on the commandline");

            m = new MyManagedCompiler();
            m.DebugType = "PdbOnly";
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see only /debug+ on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == true, "Expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // Expect to find only PdbOnly on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == true, "Expected to find /debug:PdbOnly on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == false, "Not expected to find /debug:Full on the commandline");

            m = new MyManagedCompiler();
            m.DebugType = "none";
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see /debug- on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == true, "Expected to find /debug- on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            // We do not expect to see any /debug: on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");

            m = new MyManagedCompiler();
            m.DebugType = null;
            m.EmitDebugInformation = true;
            m.AddResponseFileCommands();
            // We expect to see only /debug+ on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == true, "Expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // We expect to not find any /debug: on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");
        }
        public void TestDebugSymbolsNull()
        {
            MyManagedCompiler m = new MyManagedCompiler();
            m.DebugType = "Full";
            m.AddResponseFileCommands();
            // We expect to not see /debug + or -
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            // We expect to find /debug:Full
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == true, "Expected to find /debug:Full on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == false, "Not expected to find /debug:PdbOnly on the commandline");

            m = new MyManagedCompiler();
            m.DebugType = "PdbOnly";
            m.AddResponseFileCommands();
            // We do not expect to see /debug + or -
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            // We expect to find /debug:PdbOnly
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:PdbOnly") == true, "Expected to find /debug:PdbOnly on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:Full") == false, "Not expected to find /debug:Full on the commandline");

            m = new MyManagedCompiler();
            m.DebugType = "none";
            m.AddResponseFileCommands();
            // We expect to see /debug- on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == true, "Expected to find /debug- on the commandline");
            // We do not expect to see any /debug: on the commandline
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");

            // The cases where DebugType and DebugSymbols are Blank(not set) is a special case because in microsoft.common.targets 
            // when the configuration is "debug" and both DebugType and DebugSymbols are blank DebugSymbols will be set to True.
            // In relase the DebugSymbols will remail blank
            // Debug:   Blank              Blank       /debug+ //Microsof.common.targets will set DebugSymbols to true.
            // This makes the case equal to the testing of EmitDebugSymbols=true and DebugType=null which is done in TestDebugSymbolsTrue above.
            // Release: Blank              Blank       "Nothing for either switch"
            m = new MyManagedCompiler();
            m.DebugType = null;
            m.AddResponseFileCommands();
            // We do not expect to find /debug+ or /debug-
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug+") == false, "Not expected to find /debug+ on the commandline");
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug-") == false, "Not expected to find /debug- on the commandline");
            // We do not expect to find /debug:
            Assert.IsTrue(m.VerifySwitchOnCommandLine("/debug:") == false, "Not expected to find /debug: on the commandline");
        }