-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a75734
commit 3606c0a
Showing
4 changed files
with
94 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...ProbeExpressionsResources/Approvals/DebuggerExpressionLanguageTests.NotEqual.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Condition: | ||
Json: | ||
{ | ||
"or": [ | ||
{ | ||
"eq": [ | ||
{ | ||
"getmember": [ | ||
{ | ||
"ref": "Nested" | ||
}, | ||
"NestedString" | ||
] | ||
}, | ||
"dd" | ||
] | ||
}, | ||
{ | ||
"ne": [ | ||
{ | ||
"getmember": [ | ||
{ | ||
"ref": "Nested" | ||
}, | ||
"NestedString" | ||
] | ||
}, | ||
null | ||
] | ||
} | ||
] | ||
} | ||
|
||
Expression: ( | ||
scopeMember, | ||
scopeMember, | ||
scopeMember, | ||
exception, | ||
scopeMemberArray) => | ||
{ | ||
var this = (DebuggerExpressionLanguageTests.TestStruct)scopeMember.Value; | ||
var @return = (string)scopeMember.Value; | ||
var @duration = (TimeSpan)scopeMember.Value; | ||
var @exception = exception; | ||
var IntLocal = (int)scopeMemberArray[0].Value; | ||
var DoubleLocal = (double)scopeMemberArray[1].Value; | ||
var StringLocal = (string)scopeMemberArray[2].Value; | ||
var CollectionLocal = (List<string>)scopeMemberArray[3].Value; | ||
var DictionaryLocal = (Dictionary<string, string>)scopeMemberArray[4].Value; | ||
var NestedObjectLocal = (DebuggerExpressionLanguageTests.TestStruct.NestedObject)scopeMemberArray[5].Value; | ||
var NullLocal = (DebuggerExpressionLanguageTests.TestStruct.NestedObject)scopeMemberArray[6].Value; | ||
var IntArg = (int)scopeMemberArray[7].Value; | ||
var DoubleArg = (double)scopeMemberArray[8].Value; | ||
var StringArg = (string)scopeMemberArray[9].Value; | ||
var CollectionArg = (List<string>)scopeMemberArray[10].Value; | ||
var NestedObjectArg = (DebuggerExpressionLanguageTests.TestStruct.NestedObject)scopeMemberArray[11].Value; | ||
var $dd_el_result = (this.Nested.NestedString == "dd") || (this.Nested.NestedString != null); | ||
|
||
return $dd_el_result; | ||
} | ||
Result: True |
31 changes: 31 additions & 0 deletions
31
tracer/test/Datadog.Trace.Tests/Debugger/ProbeExpressionsResources/Conditions/NotEqual.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"dsl": "Nested.NestedString == \"d\" or Nested.NestedString != null", | ||
"or": [ | ||
{ | ||
"eq": [ | ||
{ | ||
"getmember": [ | ||
{ | ||
"ref": "Nested" | ||
}, | ||
"NestedString" | ||
] | ||
}, | ||
"dd" | ||
] | ||
}, | ||
{ | ||
"ne": [ | ||
{ | ||
"getmember": [ | ||
{ | ||
"ref": "Nested" | ||
}, | ||
"NestedString" | ||
] | ||
}, | ||
null | ||
] | ||
} | ||
] | ||
} |