コード例 #1
0
        public void DefaultTargetEnvironemntForX64WrittenToVcxproj()
        {
            var p = new VCppProjectMIDLParameters(x64Suite);
            var xml = GetProperties(p);

            var defineNodes = xml.SelectNodes("TargetEnvironment");
            defineNodes.Should().NotBeNull();
            defineNodes.Count.Should().Be(1);
            defineNodes[0].InnerText.Should().Be("X64");
        }
コード例 #2
0
        private XmlElement GetProperties(VCppProjectMIDLParameters p)
        {
            using (var writer = new StringWriter())
            using (var xmlWriter = new XmlTextWriter(writer))
            {
                xmlWriter.WriteStartElement("Root");
                p.ToVcxprojProperties(xmlWriter);
                xmlWriter.WriteEndElement();

                var doc = new XmlDocument();
                doc.LoadXml(writer.ToString());
                return doc.DocumentElement;
            }
        }
コード例 #3
0
 public void DefaultTargetEnvironemntForX64()
 {
     var p = new VCppProjectMIDLParameters(x64Suite);
     p.TargetEnvironment.Should().Be(MidlTargetEnvironment.X64);
 }
コード例 #4
0
 public void DefaultTargetEnvironemntForX86()
 {
     var p = new VCppProjectMIDLParameters(x86Suite);
     p.TargetEnvironment.Should().Be(MidlTargetEnvironment.Win32);
 }