Do not do Bitwise or on DeminificationError, since the Flags attribute was removed in a previous commit. Additionally update the NoFunctionMapProvided error to be NoSourceCodeProvided since FunctionMap is not

This commit is contained in:
thomabr 2016-11-17 09:58:04 -08:00
Родитель 57bfcf1dba
Коммит 0bd150bfe8
4 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -48,7 +48,7 @@ namespace SourcemapToolkit.CallstackDeminifier
}
else
{
result.DeminificationError = DeminificationError.NoFunctionMapProvided;
result.DeminificationError = DeminificationError.NoSourceCodeProvided;
}
result.DeminifiedStackFrame = new StackFrame {MethodName = wrappingFunction?.DeminfifiedMethodName};

Просмотреть файл

@ -17,9 +17,9 @@ namespace SourcemapToolkit.CallstackDeminifier
None,
/// <summary>
/// There was no FunctionMap provided by the ISourceCodeProvider.
/// There was no source code provided by the ISourceCodeProvider.
/// </summary>
NoFunctionMapProvided,
NoSourceCodeProvided,
/// <summary>
/// The function that wraps the minified stack frame could not be determined.

Просмотреть файл

@ -40,15 +40,15 @@ namespace SourcemapToolkit.CallstackDeminifier
{
if (sourceMap == null)
{
result.DeminificationError |= DeminificationError.NoSourceMap;
result.DeminificationError = DeminificationError.NoSourceMap;
}
else if (sourceMap.ParsedMappings == null)
{
result.DeminificationError |= DeminificationError.SourceMapFailedToParse;
result.DeminificationError = DeminificationError.SourceMapFailedToParse;
}
else
{
result.DeminificationError |= DeminificationError.NoMatchingMapingInSourceMap;
result.DeminificationError = DeminificationError.NoMatchingMapingInSourceMap;
}
}

Просмотреть файл

@ -80,7 +80,7 @@ namespace SourcemapToolkit.CallstackDeminifier.UnitTests
StackFrameDeminificationResult stackFrameDeminification = stackFrameDeminifier.DeminifyStackFrame(stackFrame);
// Assert
Assert.AreEqual(DeminificationError.NoFunctionMapProvided, stackFrameDeminification.DeminificationError);
Assert.AreEqual(DeminificationError.NoSourceCodeProvided, stackFrameDeminification.DeminificationError);
Assert.IsNull(stackFrameDeminification.DeminifiedStackFrame.MethodName);
Assert.IsNull(stackFrameDeminification.DeminifiedStackFrame.SourcePosition);
Assert.IsNull(stackFrameDeminification.DeminifiedStackFrame.FilePath);