Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move CSharp/Test/Emit/Attributes to Emit2 #58754

Merged
merged 1 commit into from
Jan 10, 2022
Merged

Conversation

cston
Copy link
Member

@cston cston commented Jan 10, 2022

Avoid exceeding the combined string length maximum for Emit tests.

@cston cston requested a review from a team as a code owner January 10, 2022 20:04
};
};

var verifier = CompileAndVerify(source, symbolValidator: validator(true), sourceSymbolValidator: validator(false), expectedOutput: @"System.Int32[]");
}

private static void VerifyParamArrayAttribute(ParameterSymbol parameter, bool expected = true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original declaration for reference

internal static void VerifyParamArrayAttribute(ParameterSymbol parameter, bool expected = true)
{
Assert.Equal(expected, parameter.IsParams);
var peParameter = (PEParameterSymbol)parameter;
var allAttributes = ((PEModuleSymbol)parameter.ContainingModule).GetCustomAttributesForToken(peParameter.Handle);
var paramArrayAttributes = allAttributes.Where(a => a.AttributeClass.ToTestDisplayString() == "System.ParamArrayAttribute");
if (expected)
{
Assert.Equal(1, paramArrayAttributes.Count());
}
else
{
Assert.Empty(paramArrayAttributes);
}
}
}

@RikkiGibson RikkiGibson added the Test Test failures in roslyn-CI label Jan 10, 2022
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (iteration 1)

@jcouv jcouv self-assigned this Jan 10, 2022
@RikkiGibson RikkiGibson merged commit 24ef0f3 into dotnet:main Jan 10, 2022
@ghost ghost added this to the Next milestone Jan 10, 2022
@cston cston deleted the move-tests branch January 10, 2022 21:33
@RikkiGibson RikkiGibson modified the milestones: Next, 17.2.P1 Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Test Test failures in roslyn-CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants