示例#1
0
        public void TestCheckForOverflowUnderflow2()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.CheckForOverflowUnderflow = false;
            csc.ARFC(clbe);

            Assert.AreEqual("/checked-", clbe.ToString(), "A1");
        }
示例#2
0
        public void TestDocumentationFile()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.DocumentationFile = "A";
            csc.ARFC(clbe);

            Assert.AreEqual("/doc:A", clbe.ToString(), "A1");
        }
示例#3
0
        public void TestDisabledWarningsComma()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.DisabledWarnings = "A, B";
            csc.ARFC(clbe);

            Assert.AreEqual("/nowarn:A;B", clbe.ToString(), "A1");
        }
示例#4
0
        public void TestGenerateFullPaths2()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.GenerateFullPaths = false;
            csc.ARFC(clbe);

            Assert.AreEqual("", clbe.ToString(), "A1");
        }
示例#5
0
        public void TestErrorReport()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.ErrorReport = "A";
            csc.ARFC(clbe);

            Assert.AreEqual("/errorreport:A", clbe.ToString(), "A1");
        }
示例#6
0
        public void TestModuleAssemblyName()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.ModuleAssemblyName = "A'B";
            csc.ARFC(clbe);

            Assert.AreEqual("/moduleassemblyname:\"A'B\"", clbe.ToString(), "A1");
        }
示例#7
0
        public void TestLangVersion()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.LangVersion = "A'B";
            csc.ARFC(clbe);

            Assert.AreEqual("/langversion:\"A'B\"", clbe.ToString(), "A1");
        }
示例#8
0
        public void TestPlatform()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.Platform = "A";
            csc.ARFC(clbe);

            Assert.AreEqual("/platform:A", clbe.ToString(), "A1");
        }
示例#9
0
        public void TestWarning()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.WarningLevel = 4;
            csc.ARFC(clbe);

            Assert.AreEqual("/warn:4", clbe.ToString(), "A1");
        }
示例#10
0
        public void TestWarningNotAsErrors()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.WarningsNotAsErrors = "A'B";
            csc.ARFC(clbe);

            Assert.AreEqual("/warnaserror-:\"A'B\"", clbe.ToString(), "A1");
        }
示例#11
0
        public void TestBaseAddress()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.BaseAddress = "A";
            csc.ARFC(clbe);

            Assert.AreEqual("/baseaddress:A", clbe.ToString(), "A1");
        }
示例#12
0
        public void TestAllowUnsafeBlocks2()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension clbe = new CommandLineBuilderExtension();

            csc.AllowUnsafeBlocks = false;
            csc.ARFC(clbe);

            Assert.AreEqual("/unsafe-", clbe.ToString(), "A1");
        }
示例#13
0
        public void TestWin32Resource()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            csc.Win32Resource = "A;B";
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual("/win32res:\"A;B\"", c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#14
0
        public void TestDefineConstants()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            csc.DefineConstants = "A;B;;CD;;;Foo  Bar";
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual("/define:\"A;B;CD;Foo;Bar\"", c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#15
0
        public void TestDefineConstants2()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            csc.DefineConstants = ";;;";
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual(String.Empty, c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#16
0
        public void TestMainEntryPoint()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            csc.MainEntryPoint = "A;B";
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual("/main:\"A;B\"", c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#17
0
        public void TestResponseFiles()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            csc.ResponseFiles = new ITaskItem [2] {
                new TaskItem("A\'Foo"), new TaskItem("B")
            };
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual("@\"A'Foo\" @B", c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#18
0
        public void TestAdditionalLibPaths()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            csc.AdditionalLibPaths = new string [2] {
                "A'Foo", "B"
            };
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual("/lib:\"A'Foo\",B", c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#19
0
        public void TestReferences()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            csc.References = new ITaskItem [2] {
                new TaskItem("A;C"), new TaskItem("B")
            };
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual("/reference:\"A;C\" /reference:B", c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#20
0
        public void TestReferencesAlias()
        {
            CscExtended csc = new CscExtended();
            CommandLineBuilderExtension c1 = new CommandLineBuilderExtension();
            CommandLineBuilderExtension c2 = new CommandLineBuilderExtension();

            TaskItem ti1 = new TaskItem("A");

            ti1.SetMetadata("Aliases", "r1,global,r2");

            csc.References = new ITaskItem[2] {
                ti1, new TaskItem("B")
            };
            csc.ARFC(c1);
            csc.ACLC(c2);

            Assert.AreEqual("/reference:r1=A /reference:A /reference:r2=A /reference:B", c1.ToString(), "A1");
            Assert.AreEqual(String.Empty, c2.ToString(), "A2");
        }
示例#21
0
		public void TestModuleAssemblyName ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.ModuleAssemblyName = "A'B";
			csc.ARFC (clbe);

			Assert.AreEqual ("/moduleassemblyname:\"A'B\"", clbe.ToString (), "A1");
		}
示例#22
0
		public void TestMainEntryPoint ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			csc.MainEntryPoint = "A;B";
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual ("/main:\"A;B\"", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
示例#23
0
		public void TestDefineConstants2 ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			csc.DefineConstants = ";;;";
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual (String.Empty, c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
示例#24
0
		public void TestBaseAddress ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.BaseAddress = "A";
			csc.ARFC (clbe);

			Assert.AreEqual ("/baseaddress:A", clbe.ToString (), "A1");
		}
示例#25
0
		public void TestReferences ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			csc.References = new ITaskItem [2] { new TaskItem ("A;C"), new TaskItem ("B") };
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual ("/reference:\"A;C\" /reference:B", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
示例#26
0
		public void TestDisabledWarningsComma ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.DisabledWarnings = "A, B";
			csc.ARFC (clbe);

			Assert.AreEqual ("/nowarn:A;B", clbe.ToString (), "A1");
		}
示例#27
0
		public void TestCheckForOverflowUnderflow2 ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.CheckForOverflowUnderflow = false;
			csc.ARFC (clbe);

			Assert.AreEqual ("/checked-", clbe.ToString (), "A1");
		}
示例#28
0
		public void TestErrorReport ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.ErrorReport = "A";
			csc.ARFC (clbe);

			Assert.AreEqual ("/errorreport:A", clbe.ToString (), "A1");
		}
示例#29
0
		public void TestDocumentationFile ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.DocumentationFile = "A";
			csc.ARFC (clbe);

			Assert.AreEqual ("/doc:A", clbe.ToString (), "A1");
		}
示例#30
0
		public void TestResponseFiles ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			csc.ResponseFiles = new ITaskItem [2] { new TaskItem ("A\'Foo"), new TaskItem ("B") };
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual ("@\"A'Foo\" @B", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
示例#31
0
		public void TestDefineConstants ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			csc.DefineConstants = "A;B;;CD;;;Foo  Bar";
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual ("/define:\"A;B;CD;Foo;Bar\"", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
示例#32
0
		public void TestWin32Resource ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			csc.Win32Resource = "A;B";
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual ("/win32res:\"A;B\"", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
示例#33
0
		public void TestPlatform ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.Platform = "A";
			csc.ARFC (clbe);

			Assert.AreEqual ("/platform:A", clbe.ToString (), "A1");
		}
示例#34
0
		public void TestWarning ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.WarningLevel = 4;
			csc.ARFC (clbe);

			Assert.AreEqual ("/warn:4", clbe.ToString (), "A1");
		}
示例#35
0
		public void TestWarningNotAsErrors ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.WarningsNotAsErrors = "A'B";
			csc.ARFC (clbe);

			Assert.AreEqual ("/warnaserror-:\"A'B\"", clbe.ToString (), "A1");
		}
示例#36
0
		public void TestAllowUnsafeBlocks2 ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.AllowUnsafeBlocks = false;
			csc.ARFC (clbe);

			Assert.AreEqual ("/unsafe-", clbe.ToString (), "A1");
		}
示例#37
0
		public void TestLangVersion ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.LangVersion = "A'B";
			csc.ARFC (clbe);

			Assert.AreEqual ("/langversion:\"A'B\"", clbe.ToString (), "A1");
		}
示例#38
0
		public void TestGenerateFullPaths2 ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension clbe = new CommandLineBuilderExtension ();

			csc.GenerateFullPaths = false;
			csc.ARFC (clbe);

			Assert.AreEqual ("", clbe.ToString (), "A1");
		}
示例#39
0
		public void TestReferencesAlias ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			TaskItem ti1 = new TaskItem ("A");
			ti1.SetMetadata ("Aliases", "r1,global,r2");

			csc.References = new ITaskItem[2] { ti1, new TaskItem ("B") };
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual ("/reference:r1=A /reference:A /reference:r2=A /reference:B", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}
示例#40
0
		public void TestAdditionalLibPaths ()
		{
			CscExtended csc = new CscExtended ();
			CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
			CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();

			csc.AdditionalLibPaths = new string [2] { "A'Foo", "B" };
			csc.ARFC (c1);
			csc.ACLC (c2);

			Assert.AreEqual ("/lib:\"A'Foo\",B", c1.ToString (), "A1");
			Assert.AreEqual (String.Empty, c2.ToString (), "A2");
		}