| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 namespace UnitTests | 5 namespace UnitTests |
| 6 { | 6 { |
| 7 using System; | 7 using System; |
| 8 using System.IO; |
| 8 | 9 |
| 9 using EnvDTE; | 10 using EnvDTE; |
| 10 using EnvDTE80; | 11 using EnvDTE80; |
| 11 using Microsoft.VisualStudio.TestTools.UnitTesting; | 12 using Microsoft.VisualStudio.TestTools.UnitTesting; |
| 12 using Microsoft.VisualStudio.VCProjectEngine; | 13 using Microsoft.VisualStudio.VCProjectEngine; |
| 14 using NaCl.Build.CPPTasks; |
| 13 | 15 |
| 14 /// <summary> | 16 /// <summary> |
| 15 /// This test class contains tests related to the custom project settings | 17 /// This test class contains tests related to the custom project settings |
| 16 /// and property pages for PPAPI and NaCl configurations. | 18 /// and property pages for PPAPI and NaCl configurations. |
| 17 /// </summary> | 19 /// </summary> |
| 18 [TestClass] | 20 [TestClass] |
| 19 public class ProjectSettingsTest | 21 public class ProjectSettingsTest |
| 20 { | 22 { |
| 21 /// <summary> | 23 /// <summary> |
| 22 /// The below string holds the path to a NaCl solution used in some tests. | 24 /// The below string holds the path to a NaCl solution used in some tests. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 /// Test method to check that the NaCl platform compiles a test project. | 104 /// Test method to check that the NaCl platform compiles a test project. |
| 103 /// </summary> | 105 /// </summary> |
| 104 [TestMethod] | 106 [TestMethod] |
| 105 public void CheckNaClCompile() | 107 public void CheckNaClCompile() |
| 106 { | 108 { |
| 107 string naclPlatform = NativeClientVSAddIn.Strings.NaCl64PlatformName; | 109 string naclPlatform = NativeClientVSAddIn.Strings.NaCl64PlatformName; |
| 108 TryCompile(naclSolutionEmptyInitialization, "Debug", naclPlatform); | 110 TryCompile(naclSolutionEmptyInitialization, "Debug", naclPlatform); |
| 109 TryCompile(naclSolutionEmptyInitialization, "Release", naclPlatform); | 111 TryCompile(naclSolutionEmptyInitialization, "Release", naclPlatform); |
| 110 } | 112 } |
| 111 | 113 |
| 114 |
| 115 |
| 112 /// <summary> | 116 /// <summary> |
| 113 /// Test method to check that the NaCl platform compiles a test project. | 117 /// Test method to check that the NaCl platform compiles a test project. |
| 114 /// </summary> | 118 /// </summary> |
| 115 [TestMethod] | 119 [TestMethod] |
| 116 public void CheckPNaClCompile() | 120 public void CheckPNaClCompile() |
| 117 { | 121 { |
| 122 int revision; |
| 123 string root = System.Environment.GetEnvironmentVariable("NACL_SDK_ROOT")
; |
| 124 SDKUtilities.GetSDKVersion(root, out revision); |
| 125 if (revision < SDKUtilities.MinPNaCLSDKVersion) |
| 126 { |
| 127 Assert.Inconclusive(); |
| 128 } |
| 118 string naclPlatform = NativeClientVSAddIn.Strings.PNaClPlatformName; | 129 string naclPlatform = NativeClientVSAddIn.Strings.PNaClPlatformName; |
| 119 TryCompile(naclSolutionEmptyInitialization, "Debug", naclPlatform); | 130 TryCompile(naclSolutionEmptyInitialization, "Debug", naclPlatform); |
| 120 TryCompile(naclSolutionEmptyInitialization, "Release", naclPlatform); | 131 TryCompile(naclSolutionEmptyInitialization, "Release", naclPlatform); |
| 121 } | 132 } |
| 122 | 133 |
| 123 /// <summary> | 134 /// <summary> |
| 124 /// Test method to check that the Pepper platform compiles a test project. | 135 /// Test method to check that the Pepper platform compiles a test project. |
| 125 /// </summary> | 136 /// </summary> |
| 126 [TestMethod] | 137 [TestMethod] |
| 127 public void CheckPepperCompile() | 138 public void CheckPepperCompile() |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 debug_, | 595 debug_, |
| 585 pageName, | 596 pageName, |
| 586 propertyName); | 597 propertyName); |
| 587 TestUtilities.AssertPropertyIsNotNullOrEmpty( | 598 TestUtilities.AssertPropertyIsNotNullOrEmpty( |
| 588 release_, | 599 release_, |
| 589 pageName, | 600 pageName, |
| 590 propertyName); | 601 propertyName); |
| 591 } | 602 } |
| 592 } | 603 } |
| 593 } | 604 } |
| OLD | NEW |