Skip to content

Commit 71e6564

Browse files
committed
Support for parsing logical xor operator.
1 parent 3c6e4cc commit 71e6564

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

TestStack.FluentMVCTesting.Tests/Internal/ExpressionInspectorTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,16 @@ public void Correctly_parse_expression_whose_source_text_contains_parentheses()
153153
var actual = sut.Inspect(func);
154154
Assert.AreEqual("post => post.Title.Contains(\"\")", actual);
155155
}
156+
157+
[Test]
158+
public void Correctly_parse_logical_xor_operator()
159+
{
160+
Expression<Func<string, bool>> func =
161+
text => text == "any" ^ text.Length == 3;
162+
ExpressionInspector sut = new ExpressionInspector();
163+
var actual = sut.Inspect(func);
164+
Assert.AreEqual("text => ((text == \"any\") ^ (text.Length == 3))", actual);
165+
}
156166
}
157167

158168
public class PostViewModel

0 commit comments

Comments
 (0)