Skip to content

Commit 72267c6

Browse files
committed
debugging in progress
1 parent 513b740 commit 72267c6

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CodingSeb.ExpressionEvaluator.Tests/ExpressionEvaluatorTests.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,8 +1112,10 @@ public static IEnumerable<TestCaseData> TestCasesForWithCustomVariablesExpressio
11121112
yield return new TestCaseData("simpleArray2?[3]?.Trim()", onInstanceVariables, true).SetCategory("Instance Property,Null Conditional indexing").Returns(null);
11131113

11141114
yield return new TestCaseData( "false && 1/0 == 0", onInstanceVariables, true ).SetCategory( "Instance Property,And Conditional" ).Returns( false );
1115-
yield return new TestCaseData( "!string.IsNullOrEmpty(nullVar) && nullVar.StartsWith(\"ABC\")", onInstanceVariables, true ).SetCategory( "Instance Property,And Conditional" ).Returns( false );
1116-
yield return new TestCaseData( "string.IsNullOrEmpty(nullVar) || nullVar.StartsWith(\"ABC\")", onInstanceVariables, true ).SetCategory( "Instance Property,Or Conditional" ).Returns( true );
1115+
yield return new TestCaseData("!string.IsNullOrEmpty(nullVar) && nullVar.StartsWith(\"ABC\")", onInstanceVariables, true).SetCategory("Instance Property,And Conditional").Returns(false);
1116+
yield return new TestCaseData("string.IsNullOrEmpty(nullVar) || nullVar.StartsWith(\"ABC\")", onInstanceVariables, true).SetCategory("Instance Property,Or Conditional").Returns(true);
1117+
yield return new TestCaseData("!string.IsNullOrEmpty(nullVar) && nullVar.Length < 2", onInstanceVariables, true).SetCategory("Instance Property,And Conditional").Returns(false);
1118+
yield return new TestCaseData("string.IsNullOrEmpty(nullVar) || nullVar.Length < 2", onInstanceVariables, true).SetCategory("Instance Property,Or Conditional").Returns(true);
11171119
yield return new TestCaseData( "true || 1/0 == 0", onInstanceVariables, true ).SetCategory( "Instance Property,Or Conditional" ).Returns( true );
11181120
yield return new TestCaseData( "false && true || true", onInstanceVariables, true ).SetCategory( "Instance Property,Or Conditional,And Conditional,Precedence check" ).Returns( true );
11191121
yield return new TestCaseData( "true || true && false", onInstanceVariables, true ).SetCategory( "Instance Property,Or Conditional,And Conditional,Precedence check" ).Returns( true );

CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,9 +3013,6 @@ public string RemoveComments(string scriptWithComments)
30133013

30143014
#region Utils methods for parsing and interpretation
30153015

3016-
/// <summary>
3017-
/// Should return null if an error occurred which should not interrupt the parsing process
3018-
/// </summary>
30193016
protected delegate bool? ParsingMethodDelegate(string expression, Stack<object> stack, ref int i);
30203017

30213018
protected delegate dynamic InternalDelegate(params dynamic[] args);

0 commit comments

Comments
 (0)