Parsed grouped expressions (that was easy!).
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
c417e90f36
commit
4acc09faf9
2 changed files with 31 additions and 0 deletions
|
|
@ -316,6 +316,26 @@ func TestOperatorPrecedenceParsing(t *testing.T) {
|
|||
"3 < 5 == true",
|
||||
"((3 < 5) == true)",
|
||||
},
|
||||
{
|
||||
"1 + (2 + 3) + 4",
|
||||
"((1 + (2 + 3)) + 4)",
|
||||
},
|
||||
{
|
||||
"(5 + 5) * 2",
|
||||
"((5 + 5) * 2)",
|
||||
},
|
||||
{
|
||||
"2 / (5 + 5)",
|
||||
"(2 / (5 + 5))",
|
||||
},
|
||||
{
|
||||
"-(5 + 5)",
|
||||
"(-(5 + 5))",
|
||||
},
|
||||
{
|
||||
"!(true == true)",
|
||||
"(!(true == true))",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue