Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Correct RightShiftAssign operator #1005

Closed
wants to merge 1 commit into from
Closed
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 @@ -58,7 +58,7 @@ internal class CSharpLanguageCharacteristics : LanguageCharacteristics<CSharpTok
{ CSharpSymbolType.GreaterThan, ">" },
{ CSharpSymbolType.GreaterThanEqual, ">=" },
{ CSharpSymbolType.RightShift, ">>" },
{ CSharpSymbolType.RightShiftAssign, ">>>" },
{ CSharpSymbolType.RightShiftAssign, ">>=" },
{ CSharpSymbolType.Hash, "#" },
{ CSharpSymbolType.Transition, "@" },
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class CSharpLanguageCharacteristics : LanguageCharacteristics<CSharpToken
{ CSharpSymbolType.GreaterThan, ">" },
{ CSharpSymbolType.GreaterThanEqual, ">=" },
{ CSharpSymbolType.RightShift, ">>" },
{ CSharpSymbolType.RightShiftAssign, ">>>" },
{ CSharpSymbolType.RightShiftAssign, ">>=" },
{ CSharpSymbolType.Hash, "#" },
{ CSharpSymbolType.Transition, "@" },
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Xunit;

namespace Microsoft.AspNetCore.Razor.Evolution.Legacy
{
public class CSharpLanguageCharacteristicsTest
{
[Fact]
public void GetSample_RightShiftAssign_ReturnsCorrectSymbol()
{
// Arrange & Act
var symbol = CSharpLanguageCharacteristics.Instance.GetSample(CSharpSymbolType.RightShiftAssign);

// Assert
Assert.Equal(">>=", symbol);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using Microsoft.AspNetCore.Razor.Tokenizer.Symbols;
using Xunit;

namespace Microsoft.AspNetCore.Razor.Parser
{
public class CSharpLanguageCharacteristicsTest
{
[Fact]
public void GetSymbolSample_RightShiftAssign_ReturnsCorrectSymbol()
{
// Arrange & Act
var symbol = CSharpLanguageCharacteristics.GetSymbolSample(CSharpSymbolType.RightShiftAssign);

// Assert
Assert.Equal(">>=", symbol);
}
}
}