//---------------------------------------------------------------------------
// Wrapper for TextPatternRange.ExpandToEnclosingUnit Method
//---------------------------------------------------------------------------
internal void Range_ExpandToEnclosingUnit(TextPatternRange callingRange, TextUnit unit, Type expectedException, CheckType checkType)
{
string call = "TextPatternRange.ExpandToEnclosingUnit(" + unit + ")";
Comment("---Calling " + call);
if (callingRange == null)
throw new ArgumentNullException(call + " requires non-NULL TextPatterncallingRange");
try
{
callingRange.ExpandToEnclosingUnit(unit);
}
catch (Exception actualException)
{
if (Library.IsCriticalException(actualException))
throw;
TestException(expectedException, actualException, call, checkType);
return;
}
TestNoExceptionQuiet(expectedException, call, checkType);
}