Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
namespace Microsoft.Build.UnitTests.OM.Construction
{
/// <summary>
// <summary>Tests for the ProjectExtensionsElement class.</summary>
/// Tests for the class
/// Tests for the <see cref="ProjectExtensionsElement"/> class.
/// </summary>
public class ProjectExtensionsElement_Tests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public void ProjectItemModify()
new KeyValuePair<string, string>("b", "bValue"),
};

/// test AddItems
// test AddItems
// add a new files in the view, ensure it is added correctly and also the real object will immediately reflect that add as well
Assert.Null(pair.GetSingleItemWithVerify(ObjectType.View, "foo.cpp"));
var fooView = pair.AddSingleItemWithVerify(ObjectType.View, "cpp", "foo.cpp");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public override ProjectItemDefinition CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectItemDefinitionLink remoting
// ProjectItemDefinitionLink remoting
public MockProjectLinkRemoter Project => this.OwningCollection.Export<Project, MockProjectLinkRemoter>(this.Source.Project);
public string ItemType => this.Source.ItemType;
public ICollection<MockProjectMetadataLinkRemoter> Metadata => this.OwningCollection.ExportCollection<ProjectMetadata, MockProjectMetadataLinkRemoter>(this.Source.Metadata);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public override ProjectItem CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectItemLink remoting
// ProjectItemLink remoting
public MockProjectLinkRemoter Project => this.OwningCollection.Export<Project, MockProjectLinkRemoter>(this.Source.Project);
public MockProjectItemElementLinkRemoter Xml => (MockProjectItemElementLinkRemoter)this.OwningCollection.ExportElement(this.Source.Xml);
public string EvaluatedInclude => this.Source.EvaluatedInclude;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public override Project CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectLink remoting
// ProjectLink remoting
public MockProjectElementLinkRemoter Xml => this.OwningCollection.ExportElement(this.Source.Xml);

public bool ThrowInsteadOfSplittingItemElement { get => this.Source.ThrowInsteadOfSplittingItemElement; set => this.Source.ThrowInsteadOfSplittingItemElement = value; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public override ProjectMetadata CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectMetadataLink remoting
// ProjectMetadataLink remoting
public object Parent
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ public override ProjectProperty CreateLinkedObject(IImportHolder holder)
return holder.Linker.LinkFactory.Create(link);
}


/// ProjectPropertyLink remoting
// ProjectPropertyLink remoting
public MockProjectLinkRemoter Project => this.OwningCollection.Export<Project, MockProjectLinkRemoter>(this.Source.Project);
public MockProjectPropertyElementLinkRemoter Xml => (MockProjectPropertyElementLinkRemoter)this.ExportElement(this.Source.Xml);
public string Name => this.Source.Name;
Expand Down
7 changes: 5 additions & 2 deletions src/Build.UnitTests/BackEnd/BuildManager_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3802,9 +3802,12 @@ public void OutOfProcFileBasedP2PBuildSucceeds()
}
}

/// When a ProjectInstance based BuildRequestData is built out of proc, the node should
/// <summary>
/// When a <see cref="ProjectInstance"/> based <see cref="BuildRequestData"/> is built out of proc, the node should
/// not reload it from disk but instead fully utilize the entire translate project instance state
/// to do the build
/// to do the build.
/// </summary>
/// <param name="shouldSerializeEntireState"><see langword="true"/> to serialize the entire project instance state; otherwise, <see langword="false"/>.</param>
Comment thread
elachlan marked this conversation as resolved.
[Theory]
[InlineData(false)]
[InlineData(true)]
Expand Down
2 changes: 1 addition & 1 deletion src/Build/Construction/ProjectRootElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace Microsoft.Build.Construction
[DebuggerDisplay("{FullPath} #Children={Count} DefaultTargets={DefaultTargets} ToolsVersion={ToolsVersion} InitialTargets={InitialTargets} ExplicitlyLoaded={IsExplicitlyLoaded}")]
public class ProjectRootElement : ProjectElementContainer
{
/// Constants for default (empty) project file.
// Constants for default (empty) project file.
private const string EmptyProjectFileContent = "{0}<Project{1}{2}>\r\n</Project>";
private const string EmptyProjectFileXmlDeclaration = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n";
private const string EmptyProjectFileToolsVersion = " ToolsVersion=\"" + MSBuildConstants.CurrentToolsVersion + "\"";
Expand Down
9 changes: 7 additions & 2 deletions src/Build/Utilities/EngineFileUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,14 @@ private static bool MatchesLazyWildcard(string fileSpec)
return _regexMatchCache.Value.GetOrAdd(fileSpec, file => s_lazyWildCardExpansionRegexes.Any(regex => regex.IsMatch(fileSpec)));
}

/// Returns a Func that will return true IFF its argument matches any of the specified filespecs
/// Assumes filespec may be escaped, so it unescapes it
/// <summary>
/// Returns a Func that will return true IFF its argument matches any of the specified filespecs.
/// Assumes filespec may be escaped, so it unescapes it.
/// The returned function makes no escaping assumptions or escaping operations. Its callers should control escaping.
/// </summary>
/// <param name="filespecsEscaped"></param>
/// <param name="currentDirectory"></param>
Comment thread
elachlan marked this conversation as resolved.
/// <returns>A Func that will return true IFF its argument matches any of the specified filespecs.</returns>
internal static Func<string, bool> GetFileSpecMatchTester(IList<string> filespecsEscaped, string currentDirectory)
{
var matchers = filespecsEscaped
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks.UnitTests/AssemblyDependency/FilePrimary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public void ExistsPromotedDependencyInTheBlackList()
/// In this case,
/// - A single primary file reference to assembly version 1.0.0.0 was passed in.
/// - An app.config was passed in that promotes a *different* assembly version name from
// 1.0.0.0 to 2.0.0.0
/// 1.0.0.0 to 2.0.0.0
/// - Version 1.0.0.0 of the file exists.
/// - Version 2.0.0.0 of the file exists.
/// Expected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void Exists()
/// In this case,
/// - A single primary non-version-strict reference was passed in to assembly version 1.0.0.0
/// - An app.config was passed in that promotes a *different* assembly version name from
// 1.0.0.0 to 2.0.0.0
/// 1.0.0.0 to 2.0.0.0
/// - Version 1.0.0.0 of the file exists.
/// - Version 2.0.0.0 of the file exists.
/// Expected:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void ExistsPromotedDependencyInTheBlackList()
/// - A single reference to DependsOnUnified was passed in.
/// - This assembly depends on version 1.0.0.0 of UnifyMe.
/// - An app.config was passed in that promotes a *different* assembly version name from
// 1.0.0.0 to 2.0.0.0
/// 1.0.0.0 to 2.0.0.0
/// - Version 1.0.0.0 of the file exists.
/// - Version 2.0.0.0 of the file exists.
/// Expected:
Expand Down
2 changes: 1 addition & 1 deletion src/Tasks.UnitTests/AssignProjectConfiguration_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public void VerifyDefaultValueDefaultToVcxPlatformMappings()

AssignProjectConfiguration assignProjectConfiguration = new AssignProjectConfiguration();

/// Test defaults with nothing set
// Test defaults with nothing set
string actualDefaultToVcxPlatformMapping = assignProjectConfiguration.DefaultToVcxPlatformMapping;
Assert.Equal(actualDefaultToVcxPlatformMapping, expectedDefaultToVcxPlatformMapping);

Expand Down