You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2238 lines
46 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# strings tests
---
test case: 'strings comparison, brackets outside of the first operand'
in:
expression: '("ccc")="ccc"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, broken expression'
in:
expression: '("c\"c\"c")="ccc'
out:
error: 'Cannot evaluate expression: unterminated string at "ccc".'
return: 'FAIL'
---
test case: 'strings comparison, location of brackets around operands is different'
in:
expression: '("ccc")="(ccc)"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, brackets inside of the second operand'
in:
expression: '"ccc"="(ccc)"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, castable to ints'
in:
expression: '" 2"="2"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, single bracket'
in:
expression: '"ccc"=("ccc"'
out:
error: 'Cannot evaluate expression: expected closing parenthesis at "".'
return: 'FAIL'
---
test case: 'strings comparison'
in:
expression: '"ccc"="ccc"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings that are ints comparison'
in:
expression: '"222"="222"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings empty space 1'
in:
expression: '" "=" "'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings empty space 2'
in:
expression: '" "=" "'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings null terminators'
in:
expression: '"\0"="\0"'
out:
error: 'Cannot evaluate expression: invalid escape sequence at "\0"="\0"".'
return: 'FAIL'
---
test case: 'strings are quotes 1'
in:
expression: '"\"\""="\"\""'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings are quotes 2'
in:
expression: '"\"\""="\""'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings are escapes 1'
in:
expression: '"\"="\"'
out:
error: 'Cannot evaluate expression: value ""=" is not a numeric operand.'
return: 'FAIL'
---
test case: 'strings are escapes 2'
in:
expression: '"\\"="\\"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings are escapes 3'
in:
expression: '"\\\"="\\\"'
out:
error: 'Cannot evaluate expression: value "\"=" is not a numeric operand.'
return: 'FAIL'
---
test case: 'strings are escapes 4'
in:
expression: '"\\\\"="\\\\"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, carriage return 1'
in:
expression: "\"a\r\nb\"=\"a\nb\""
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, carriage return 2'
in:
expression: "\"a\nb\"=\"a\r\nb\""
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, carriage return 3'
in:
expression: "\"a\r\rb\"=\"a\r\n\rb\""
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, carriage return 4'
in:
expression: "(\"a\r\rb\"=\"a\r\n\rb\") + (\"\r\"=\"\") + (\"\r\"=\"\r\")"
out:
value: 2
return: 'SUCCEED'
---
test case: 'strings comparison, carriage return 5'
in:
expression: "\"\r\r\r\ra\\\"\"=\"a\\\"\r\""
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, operands are different'
in:
expression: '"ccc"<>("cccc")'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, empty strings'
in:
expression: '(" ")<>(" ")'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, brackets are outside of the second operand'
in:
expression: '"ccc"<>("ccc")'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, brackets are outside of both operands'
in:
expression: '("ccc")<>("")'
out:
value: 1
return: 'SUCCEED'
---
test case: 'strings comparison, empty operands 1'
in:
expression: '("")<>("")'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, empty operands 2'
in:
expression: '("\0")<>("\0")'
out:
error: 'Cannot evaluate expression: invalid escape sequence at "\0")<>("\0")".'
return: 'FAIL'
---
test case: 'strings comparison, empty operands 3'
in:
expression: '("\\0")<>("\\0")'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, empty operands 3'
in:
expression: '("")<>""'
out:
value: 0
return: 'SUCCEED'
---
test case: 'strings comparison, operands are are brackets'
in:
expression: '"()"="()"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'string castable'
in:
expression: '"11"'
out:
value: 11
return: 'SUCCEED'
---
test case: 'not_castable_str 1'
in:
expression: '"11x"'
out:
error: 'Cannot evaluate expression: value "11x" is not a numeric operand.'
return: 'FAIL'
---
test case: 'not_castable_str 2'
in:
expression: '"11_"'
out:
error: 'Cannot evaluate expression: value "11_" is not a numeric operand.'
return: 'FAIL'
---
test case: 'not_castable_str 3'
in:
expression: '"11_!@#$%^&*()"'
out:
error: 'Cannot evaluate expression: value "11_!@#$%^&*()" is not a numeric operand.'
return: 'FAIL'
---
test case: 'string castable negative'
in:
expression: '"-100000000000"'
out:
value: -100000000000
return: 'SUCCEED'
---
test case: 'string castable with suffix'
in:
expression: '"2.5M"'
out:
value: 2621440
return: 'SUCCEED'
---
test case: 'string castable with suffix str comparison 1'
in:
expression: '"2.5M"="2621440"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'string castable with suffix str comparison 2'
in:
expression: '"2.5M"<>"2621440"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'string castable with suffix str comparison 3'
in:
expression: '"2.5M"="2.5M"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'string castable with suffix int comparison 1'
in:
expression: '"2.5M"=2621440'
out:
value: 1
return: 'SUCCEED'
---
test case: 'string castable with suffix int comparison 2'
in:
expression: '"2.5M"<>2621440'
out:
value: 0
return: 'SUCCEED'
---
test case: 'string castable with suffix, suffix comparison 1'
in:
expression: '"2.5M"=2.5M'
out:
value: 1
return: 'SUCCEED'
---
test case: 'string castable with suffix, suffix comparison 2'
in:
expression: '-1K="-1K"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'unicode 1'
in:
expression: '"//etc//примеромер_1"="//etc//примеромер_1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'unicode 2'
in:
expression: '"пример номер 1"="просто пример"'
out:
value: 0
return: 'SUCCEED'
# scientific notation tests
---
test case: 'scientific notation, simple comparison'
in:
expression: '"1e+0"=1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'scientific notation, large int number'
in:
expression: '"1e+40"=10000000000000000000000000000000000000000'
out:
value: 1
return: 'SUCCEED'
---
test case: 'scientific notation, large string number'
in:
expression: '"1e+40"="10000000000000000000000000000000000000000"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'scientific notation, negative exponent'
in:
expression: '"1e-40"="0.00000000000000000000000000000000000000001"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'scientific notation, precision limit holds'
in:
expression: '"1e+40"=10000000000000001000000000000000000000000'
out:
value: 0
return: 'SUCCEED'
---
test case: 'scientific notation, precision limit does not hold'
in:
expression: '"1e+40"=10000000000000000100000000000000000000000'
out:
value: 1
return: 'SUCCEED'
---
test case: 'scientific notation, precision limit does not hold 2'
in:
expression: '"1e+40"<>10000000000000000000000000000000000000001'
out:
value: 0
return: 'SUCCEED'
---
test case: 'scientific notation, negative number'
in:
expression: '-10000000000000000000000000000000000000000="-1e+40"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'scientific notation, negative number 2'
in:
expression: '-10000000000000000000000000000000000000000="1e+40"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'scientific notation, addition'
in:
expression: '("-1e+40"+10000000000000000000000000000000000000000)=0'
out:
value: 1
return: 'SUCCEED'
# '-' operator tests
---
test case: 'term 8, one on its own'
in:
expression: '-"1"'
out:
value: -1
return: 'SUCCEED'
---
test case: 'term 8, one with brackets'
in:
expression: '-("1")'
out:
value: -1
return: 'SUCCEED'
---
test case: 'term 8, not_castable_str negative 1'
in:
expression: '-"a"'
out:
error: 'Cannot evaluate expression: value "a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 8, not_castable_str negative 2'
in:
expression: '"-a"'
out:
error: 'Cannot evaluate expression: value "-a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 8, not_castable_str quotes'
in:
expression: '"\""'
out:
error: 'Cannot evaluate expression: value """ is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 8, not_castable_str quotes 2'
in:
expression: '"\"\""'
out:
error: 'Cannot evaluate expression: value """" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 8, not_castable_str quotes 3'
in:
expression: '"3"="\"\""'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 8, not_castable_str quotes 4'
in:
expression: '3="\"\""'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 8, not_castable_str quotes 5'
in:
expression: '"\"\"\""="\"\"\""'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 8, not_castable_str quotes 6'
in:
expression: '\"\"\"="\"\"\"'
out:
error: 'Cannot evaluate expression: expected numeric token at "\"\"\"="\"\"\"".'
return: 'FAIL'
# 'not' operator tests
---
test case: 'term 7, one'
in:
expression: 'not "1"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 7, zero'
in:
expression: 'not "0"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 7, negative'
in:
expression: 'not "-2"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 7, no space'
in:
expression: 'not"2"'
out:
error: 'Cannot evaluate expression: expected numeric token at "not"2"".'
return: 'FAIL'
---
test case: 'term 7, not_castable_str'
in:
expression: 'not "a"'
out:
error: 'Cannot evaluate expression: value "a" is not a numeric operand.'
return: 'FAIL'
# '/' and '*' operator tests
---
test case: 'term 6 / str and str'
in:
expression: '"3"/"2"'
out:
value: 1.5
return: 'SUCCEED'
---
test case: 'term 6 / int and str'
in:
expression: '3/"2"'
out:
value: 1.5
return: 'SUCCEED'
---
test case: 'term 6 / str and int'
in:
expression: '"3"/2'
out:
value: 1.5
return: 'SUCCEED'
---
test case: 'term 6 / not_castable_str and int'
in:
expression: '"a"/2'
out:
error: 'Cannot evaluate expression: value "a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 / int and not_castable_str'
in:
expression: '2/"y"'
out:
error: 'Cannot evaluate expression: value "y" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 / int and not_castable_string negative'
in:
expression: '2/"-y"'
out:
error: 'Cannot evaluate expression: value "-y" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 / not_castable_str and not_castable_str'
in:
expression: '"-"/"-y"'
out:
error: 'Cannot evaluate expression: value "-" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 / castable_str and not_castable_str'
in:
expression: '"9"/"-y"'
out:
error: 'Cannot evaluate expression: value "-y" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 / not_castable_str and zero int'
in:
expression: '"-z"/0'
out:
error: 'Cannot evaluate expression: value "-z" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 / not_castable_str and zero str'
in:
expression: '"-z"/"0"'
out:
error: 'Cannot evaluate expression: value "-z" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 / str and zero str'
in:
expression: '"1"/"0"'
out:
error: 'Cannot evaluate expression: division by zero.'
return: 'FAIL'
---
test case: 'term 6 * str and str'
in:
expression: '"3"*"2"'
out:
value: 6
return: 'SUCCEED'
---
test case: 'term 6 * str and int'
in:
expression: '"3"*2'
out:
value: 6
return: 'SUCCEED'
---
test case: 'term 6 * int and str'
in:
expression: '3*"2"'
out:
value: 6
return: 'SUCCEED'
---
test case: 'term 6 * int and not_castable_str'
in:
expression: '3*"3a"'
out:
error: 'Cannot evaluate expression: value "3a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 * not_castable_str and int'
in:
expression: '"bb"*3'
out:
error: 'Cannot evaluate expression: value "bb" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 6 * not_castable_str and not_castable_str'
in:
expression: '"bb"*""'
out:
error: 'Cannot evaluate expression: value "bb" is not a numeric operand.'
return: 'FAIL'
# '+' and '-' operator tests
---
test case: 'term 5 + str and str'
in:
expression: '"3"+"2"'
out:
value: 5
return: 'SUCCEED'
---
test case: 'term 5 + str and int'
in:
expression: '"3"+2'
out:
value: 5
return: 'SUCCEED'
---
test case: 'term 5 + int and str'
in:
expression: '3+"2"'
out:
value: 5
return: 'SUCCEED'
---
test case: 'term 5 + int and not_castable_str'
in:
expression: '3+"a"'
out:
error: 'Cannot evaluate expression: value "a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 5 + not_castable_str and int'
in:
expression: '"a"+"0"'
out:
error: 'Cannot evaluate expression: value "a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 5 + castable_str and not_castable_str'
in:
expression: '"3"+"a"'
out:
error: 'Cannot evaluate expression: value "a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 5 - str and str'
in:
expression: '"3"-"2"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 5 - int and str'
in:
expression: '2-"3"'
out:
value: -1
return: 'SUCCEED'
---
test case: 'term 5 - str and int'
in:
expression: '"3"-3'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 5 - not_castable_str and int'
in:
expression: '"a"-3'
out:
error: 'Cannot evaluate expression: value "a" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 5 - int and not_castable_str'
in:
expression: '4-"aa"'
out:
error: 'Cannot evaluate expression: value "aa" is not a numeric operand.'
return: 'FAIL'
# '<=', '=>', '<' and '>' operator tests
---
test case: 'term 4 <= str and str 1'
in:
expression: '"3"<="3"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 <= str and str 2'
in:
expression: '"3"<="2"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 <= str and int'
in:
expression: '"3"<=3'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 <= str and int'
in:
expression: '"3"<=2'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 <= int and not_castable_str'
in:
expression: '3<="badger"'
out:
error: 'Cannot evaluate expression: value "badger" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 4 <= not_castable_str and castable_str'
in:
expression: '"badger"<="3"'
out:
error: 'Cannot evaluate expression: value "badger" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 4 >= str and str 1'
in:
expression: '"3">="2"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 >= not_castable_str and int'
in:
expression: '"```````">=2'
out:
error: 'Cannot evaluate expression: value "```````" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 4 >= int and not_castable_str'
in:
expression: '-(10)>="()"'
out:
error: 'Cannot evaluate expression: value "()" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 4 >= str and str 2'
in:
expression: '"3">="4"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 >= str and int'
in:
expression: '"3">=3'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 >= str and int'
in:
expression: '"3">=5'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 < str and str 1'
in:
expression: '"3"<"3"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 < str and str 2'
in:
expression: '"3"<"4"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 < str and int'
in:
expression: '"3"<3'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 < str and int'
in:
expression: '"3"<5'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 < not_castable_str and int'
in:
expression: '"4g4"<5'
out:
out:
error: 'Cannot evaluate expression: value "4g4" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 4 < str and not_castable_str'
in:
expression: '"999999999999"<"5_"'
out:
error: 'Cannot evaluate expression: value "5_" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 4 > str and str 1'
in:
expression: '"3">"3"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 > str and str 2'
in:
expression: '"5">"4"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 > str and int'
in:
expression: '"3">3'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 4 > str and int'
in:
expression: '"3">0'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 4 > str and not_castable_str'
in:
expression: '"3">"+"'
out:
error: 'Cannot evaluate expression: value "+" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 4 > not_castable_str and int'
in:
expression: '"d3">7'
out:
error: 'Cannot evaluate expression: value "d3" is not a numeric operand.'
return: 'FAIL'
# '=' and '<>' operator tests
---
test case: 'term 3 = str and str 1'
in:
expression: '"3"="3"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 = str and str 2'
in:
expression: '"3"="0"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 = str and str 2, empty space'
in:
expression: '" 3"="3"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 = not_castable_str and not_castable_str 1'
in:
expression: '"badger"="badger"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 = not_castable_str and not_castable_str 2'
in:
expression: '"badger"="badgex"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 = not_castable_str and not_castable_str 3'
in:
expression: '"!@#$%^&*()_+"="!@#$%^&*()_+"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 = str and int 1'
in:
expression: '"3"=3'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 = str and int 2'
in:
expression: '"3"=0'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 = str and int empty space'
in:
expression: '" 3"=3'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 = int and str 1'
in:
expression: '3="3"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 = int and str 2'
in:
expression: '3="0"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 = int and str empty space'
in:
expression: '0=" 0"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 = int and not_castable_str'
in:
expression: '3="_______________________"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 <> str and str 1'
in:
expression: '"3"<>"3"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 <> str and str 2'
in:
expression: '"3"<>"0"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 <> not_castable_str and not_castable_str 1'
in:
expression: '"badger"<>"badger"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 <> not_castable_str and not_castable_str 2'
in:
expression: '"badger"<>"badgex"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 <> not_castable_str and not_castable_str 3'
in:
expression: '"!@#$%^&*()_+"<>"!@#$%^&*()_+"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 <> str and int 1'
in:
expression: '"3"<>3'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 <> str and int 2'
in:
expression: '"3"<>10'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 <> int and str 1'
in:
expression: '3<>"3"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 3 <> int and str 2'
in:
expression: '3<>"-10"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 3 <> not_castable_str and int'
in:
expression: '"&&&&&&&&&&"<>-89'
out:
value: 1
return: 'SUCCEED'
# 'and' operator tests
---
test case: 'term 2 and str and str 1'
in:
expression: '"1" and "1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 2 and str and str 2'
in:
expression: '"1" and "0"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 2 and str and not_castable_str'
in:
expression: '"1" and "\\t"'
out:
error: 'Cannot evaluate expression: value "\t" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 2 and not_castable_str and int'
in:
expression: '"\\t" and 1'
out:
error: 'Cannot evaluate expression: value "\t" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 2 and not_castable_str and not_castable_str'
in:
expression: '"\\t" and "\\t"'
out:
error: 'Cannot evaluate expression: value "\t" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 2 and str and int 1'
in:
expression: '"-1" and 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 2 and str and int 2'
in:
expression: '"0" and 0'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 2 and int and str 1'
in:
expression: '-1 and "-1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 2 and int and str 1'
in:
expression: '0 and "100"'
out:
value: 0
return: 'SUCCEED'
# 'or' operator tests
---
test case: 'term 1 or str and str 1'
in:
expression: '"1" or "1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 1 or str and str 2'
in:
expression: '"00" or "0"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 1 or str and not_castable_str'
in:
expression: '"1" or "\\n"'
out:
error: 'Cannot evaluate expression: value "\n" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 1 or not_castable_str and int'
in:
expression: '"\\n\\n\\n" and 1'
out:
error: 'Cannot evaluate expression: value "\n\n\n" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 1 or not_castable_str and not_castable_str 1'
in:
expression: '"\\n" and "\\n"'
out:
error: 'Cannot evaluate expression: value "\n" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 1 or not_castable_str and not_castable_str 2'
in:
expression: '"\\n" and "\\n"'
out:
error: 'Cannot evaluate expression: value "\n" is not a numeric operand.'
return: 'FAIL'
---
test case: 'term 1 or str and int 1'
in:
expression: '"-1" or 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 1 or str and int 2'
in:
expression: '"0" or 0'
out:
value: 0
return: 'SUCCEED'
---
test case: 'term 1 or int and str 1'
in:
expression: '-1 or "-1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'term 1 or int and str 1'
in:
expression: '0 or "-0"'
out:
value: 0
return: 'SUCCEED'
# int tests
---
test case: 'Valid expression "-1"'
in:
expression: '-1'
out:
value: -1
return: 'SUCCEED'
---
test case: 'Valid expression "- 1"'
in:
expression: '- 1'
out:
value: -1
return: 'SUCCEED'
---
test case: 'Valid expression " - 1K "'
in:
expression: ' - 1K '
out:
value: -1024
return: 'SUCCEED'
---
test case: 'Valid expression "not -1"'
in:
expression: 'not -1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "not 1"'
in:
expression: 'not 1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "not 0"'
in:
expression: 'not 0'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1.5 * 4"'
in:
expression: '1.5 * 4'
out:
value: 6
return: 'SUCCEED'
---
test case: 'Valid expression "1024K/4M"'
in:
expression: '1024K/4M'
out:
value: 0.25
return: 'SUCCEED'
---
test case: 'Valid expression "1+2'
in:
expression: '1+2'
out:
value: 3
return: 'SUCCEED'
---
test case: 'Valid expression "1-2"'
in:
expression: '1-2'
out:
value: -1
return: 'SUCCEED'
---
test case: 'Valid expression "1<2"'
in:
expression: '1<2'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1<1"'
in:
expression: '1<1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "2<1"'
in:
expression: '2<1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1<=2"'
in:
expression: '1<=2'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "2<=2"'
in:
expression: '2<=2'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "3<=2"'
in:
expression: '3<=2'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "2>=1"'
in:
expression: '2>=1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "2>=2"'
in:
expression: '2>=2'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1>=2"'
in:
expression: '1>=2'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "2>1"'
in:
expression: '2>1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1>1"'
in:
expression: '1>1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1>2"'
in:
expression: '1>2'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1=1"'
in:
expression: '1=1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1=2"'
in:
expression: '1=2'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1<>1"'
in:
expression: '1<>1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1<>2"'
in:
expression: '1<>2'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1 and 1"'
in:
expression: '1 and 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0 and 1"'
in:
expression: '0 and 1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1 and 0"'
in:
expression: '1 and 0'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "0 and 0"'
in:
expression: '0 and 0'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1 or 1"'
in:
expression: '1 or 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0 or 1"'
in:
expression: '0 or 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1 or 0"'
in:
expression: '1 or 0'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0 or 0"'
in:
expression: '0 or 0'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "not 1 or 1" int int'
in:
expression: 'not 1 or 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not 1 or 1" str str'
in:
expression: 'not "1" or "1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not 1 or 1" str int'
in:
expression: 'not "1" or 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not 0 and 0" int str'
in:
expression: 'not 0 and "0"'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "-1-2-3-4" int int int int'
in:
expression: '-1-2-3-4'
out:
value: -10
return: 'SUCCEED'
---
test case: 'Valid expression "-1-2-3-4" int str str str'
in:
expression: '-1-"2"-"3"-"4"'
out:
value: -10
return: 'SUCCEED'
---
test case: 'Valid expression "-1-2-3-4" int str not_castable_str str'
in:
expression: '-1-"2"-"badger"-"4"'
out:
error: 'Cannot evaluate expression: value "badger" is not a numeric operand.'
return: 'FAIL'
---
test case: 'Valid expression "-1-(2-3-4)"'
in:
expression: '-1-(2-3-4)'
out:
value: 4
return: 'SUCCEED'
---
test case: 'Valid expression "-1-(2-(3-4))"'
in:
expression: '-1-(2-(3-4))'
out:
value: -4
return: 'SUCCEED'
---
test case: 'Valid expression "-1/2/3/4"'
in:
expression: '-1/2/3/4'
out:
value: -0.0416666666667
return: 'SUCCEED'
---
test case: 'Valid expression "-1/(2/3/4)"'
in:
expression: '-1/(2/3/4)'
out:
value: -6
return: 'SUCCEED'
---
test case: 'Valid expression "1/(2/(3/4))" int int int int'
in:
expression: '-1/(2/(3/4))'
out:
value: -0.375
return: 'SUCCEED'
---
test case: 'Valid expression "1/(2/(3/4))" int str int str'
in:
expression: '-1/("2"/(3/"4"))'
out:
value: -0.375
return: 'SUCCEED'
---
test case: 'Valid expression "5 + 10 / 3 * (not 0 + (1 or 0) + (1K and 1M))" all ints'
in:
expression: '5 + 10 / 3 * (not 0 + (1 or 0) + (1K and 1M))'
out:
value: 15
return: 'SUCCEED'
---
test case: 'Valid expression "5 + 10 / 3 * (not 0 + (1 or 0) + (1K and 1M))" ints and strings'
in:
expression: '"5" + 10 / 3 * (not "0" + ("1" or 0) + (1K and 1M))'
out:
value: 15
return: 'SUCCEED'
---
test case: 'Valid expression "3 * not 1 + (5 = 2 + 3) / 1000000000G + (1/10/100/1000 <> 1/1000000)"'
in:
expression: '3 * not 1 + (5 = 2 + 3) / 1000000000G + (1/10/100/1000 <> 1/1000000)'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "2 * 3 * 5 * 7 = 300 + 4 * -30 - -20 + 10" all ints'
in:
expression: '2 * 3 * 5 * 7 = 300 + 4 * -30 - -20 + 10'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "2 * 3 * 5 * 7 = 300 + 4 * -30 - -20 + 10" all strings'
in:
expression: '"2" * "3" * "5" * "7" = "300" + "4" * "-30" - -"20" + "10"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "-5 + 10 * -6 + 1e+2 + "1e+3" - 700 / (49 * (1 / (2 + 5))) = 935"'
in:
expression: '-5 + 10 * -6 + 1e+2 + "1e+3" - 700 / (49 * (1 / (2 + 5))) = 935'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1<2=2<1"'
in:
expression: '1<2=2<1'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1<2<>2<1"'
in:
expression: '1<2<>2<1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0<>1<2<>0"'
in:
expression: '0<>1<2<>0'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0<1<=1>=1>0"'
in:
expression: '0<1<=1>=1>0'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1/0.2"'
in:
expression: '1/0.2'
out:
value: 5
return: 'SUCCEED'
---
test case: 'Valid expression "(1-(2=2))or(1/100000)"'
in:
expression: '(1-(2=2))or(1/100000)'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "(1-(2=2))or(1/1000000)"'
in:
expression: '(1-(2=2))or(1/1000000)'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "(1-(2=2))or(1/2000000)"'
in:
expression: '(1-(2=2))or(1/2000000)'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "1K-1 < 2 * 512 and not(0000000000000000000000000000000000000000000000000000000000000000000000000)"'
in:
expression: '1K-1 < 2 * 512 and not(0000000000000000000000000000000000000000000000000000000000000000000000000)'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "2.5K = 256 * 10 and (not(1)or(1))" all ints'
in:
expression: '2.5K = 256 * 10 and (not(1)or(1))'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "2.5K = 256 * 10 and (not(1)or(1))" all strings'
in:
expression: '"2.5K" = "256" * "10" and (not("1")or("1"))'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not(not(not(not(not(not 1)))))"'
in:
expression: 'not(not(not(not(not(not 1)))))'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "-(-(-(-(-(-2.G)))))" int'
in:
expression: '-(-(-(-(-(-2.G)))))'
out:
value: 2147483648 # 2*GIBIBYTE
return: 'SUCCEED'
---
test case: 'Valid expression "-(-(-(-(-(-2.G)))))" string'
in:
expression: '-(-(-(-(-("-2.G")))))'
out:
value: 2147483648 # 2*GIBIBYTE
return: 'SUCCEED'
---
test case: 'Valid expression "-(-(-(-(-(-.1T)))))"'
in:
expression: '-(-(-(-(-(-.1T)))))'
out:
value: 109951162777.6 # 0.1*TEBIBYTE
return: 'SUCCEED'
---
test case: 'Valid expression "not 0 <> not 1"'
in:
expression: 'not 0 <> not 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not 0K >= not 1"'
in:
expression: 'not 0K >= not 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not 00.M > not 1"'
in:
expression: 'not 00.M > not 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not .000G > not 1" all ints'
in:
expression: 'not .000G > not 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "not .000G > not 1" all strings'
in:
expression: 'not ".000G" > not "1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression " 1 + 2 * 3 = 7 and ( - 1 or - 2 ) and not 0 "'
in:
expression: ' 1 + 2 * 3 = 7 and ( - 1 or - 2 ) and not 0 '
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "(1+((2)*(3))=(7)and(-(1)or(-(2)))and(not(0)))"'
in:
expression: '(1+((2)*(3))=(7)and(-(1)or(-(2)))and(not(0)))'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "\t1\t+\t2\t*\t3\t=\t7\tand\t(\t-\t1\tor\t-\t2\t)\tand\tnot\t0\t" all ints'
in:
expression: "\t1\t+\t2\t*\t3\t=\t7\tand\t(\t-\t1\tor\t-\t2\t)\tand\tnot\t0\t"
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "\t1\t+\t2\t*\t3\t=\t7\tand\t(\t-\t1\tor\t-\t2\t)\tand\tnot\t0\t" all strings'
in:
expression: "\t\"1\"\t+\t\"2\"\t*\t\"3\"\t=\t\"7\"\tand\t(\t-\t\"1\"\tor\t-\t\"2\"\t)\tand\tnot\t\"0\"\t"
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "\r1\r+\r2\r*\r3\r=\r7\rand\r(\r-\r1\ror\r-\r2\r)\rand\rnot\r0\r"'
in:
expression: "\r1\r+\r2\r*\r3\r=\r7\rand\r(\r-\r1\ror\r-\r2\r)\rand\rnot\r0\r"
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "\n1\n+\n2\n*\n3\n=\n7\nand\n(\n-\n1\nor\n-\n2\n)\nand\nnot\n0\n" all ints'
in:
expression: "\n1\n+\n2\n*\n3\n=\n7\nand\n(\n-\n1\nor\n-\n2\n)\nand\nnot\n0\n"
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "\n1\n+\n2\n*\n3\n=\n7\nand\n(\n-\n1\nor\n-\n2\n)\nand\nnot\n0\n" some ints some strings'
in:
expression: "\n1\n+\"0\"+\n2\n*\n3\n=\n7\nand\n(\n-\n1\nor\n-\n\"2\"\n)\nand\nnot\n\"0\"\n"
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "(((((((((((((((((((((((((((((((1)))))))))))))))))))))))))))))))" int'
in:
expression: '(((((((((((((((((((((((((((((((1)))))))))))))))))))))))))))))))' # 32 levels
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "(((((((((((((((((((((((((((((((1)))))))))))))))))))))))))))))))" string'
in:
expression: '((((((((((((((((((((((((((((((("1")))))))))))))))))))))))))))))))' # 32 levels
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1)))))))))))))))))))))))))))))))" int'
in:
expression: '-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1)))))))))))))))))))))))))))))))' # 32 levels
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1)))))))))))))))))))))))))))))))" str'
in:
expression: '-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-("-1")))))))))))))))))))))))))))))))' # 32 levels
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1)))))))))))))))))))))))))))))))" not_castable_str'
in:
expression: '-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-("-")))))))))))))))))))))))))))))))' # 32 levels
out:
error: 'Cannot evaluate expression: value "-" is not a numeric operand.'
return: 'FAIL'
---
test case: 'Valid expression "17179869184 > 17179869184"'
in:
expression: '17179869184 > 17179869184'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184 < 17179869184"'
in:
expression: '17179869184 < 17179869184'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184 = 17179869184"'
in:
expression: '17179869184 = 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "1 > 1 or 1 < 1 or 1 = 1"'
in:
expression: '1 > 1 or 1 < 1 or 1 = 1'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0 > 0 or 0 < 0 or 0 = 0" all ints'
in:
expression: '0 > 0 or 0 < 0 or 0 = 0'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0 > 0 or 0 < 0 or 0 = 0" some ints some strings'
in:
expression: '0 > "0" or 0 < 0 or "0" = 0'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "0 > 0 or 0 < 0 or 0 = 0" all strings'
in:
expression: '"0" > "0" or "0" < "0" or "0" = "0"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184 > 17179869184 or 17179869184 < 17179869184 or 17179869184 = 17179869184"'
in:
expression: '17179869184 > 17179869184 or 17179869184 < 17179869184 or 17179869184 = 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 > 17179869184 or 17179869184.000001 < 17179869184 or 17179869184.000001 = 17179869184"'
in:
expression: '17179869184 > 17179869184.000001 or 17179869184 < 17179869184.000001 or 17179869184.000001 = 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184 > 17179869184.000001 or 17179869184 < 17179869184.000001 or 17179869184 = 17179869184.000001" all ints'
in:
expression: '17179869184 > 17179869184.000001 or 17179869184 < 17179869184.000001 or 17179869184 = 17179869184.000001'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184 > 17179869184.000001 or 17179869184 < 17179869184.000001 or 17179869184 = 17179869184.000001" some ints some strings'
in:
expression: '"17179869184" > 17179869184.000001 or 17179869184 < "17179869184.000001" or 17179869184 = "17179869184.000001"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 > 17179869184"'
in:
expression: '17179869184.000001 > 17179869184'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 = 17179869184" all ints'
in:
expression: '17179869184.000001 = 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 = 17179869184" some ints some strings'
in:
expression: '"17179869184.000001" = 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 < 17179869184"'
in:
expression: '17179869184.000001 < 17179869184'
out:
value: 0
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 <= 17179869184"'
in:
expression: '17179869184.000001 <= 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 >= 17179869184" ints'
in:
expression: '17179869184.000001 >= 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Valid expression "17179869184.000001 >= 17179869184" string and int'
in:
expression: '"17179869184.000001" >= 17179869184'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Invalid expression ""'
in:
expression: ''
out:
error: 'Cannot evaluate expression: unexpected end of expression.'
return: 'FAIL'
---
test case: 'Invalid expression "" string'
in:
expression: "\"\""
out:
error: 'Cannot evaluate expression: unexpected end of expression.'
return: 'FAIL'
---
test case: 'Invalid expression "+1"'
in:
expression: '+1'
out:
error: 'Cannot evaluate expression: expected numeric token at "+1".'
return: 'FAIL'
---
test case: 'Invalid expression "+1" string'
in:
expression: '+"1"'
out:
error: 'Cannot evaluate expression: expected numeric token at "+"1"".'
return: 'FAIL'
---
test case: 'Invalid expression "--1"'
in:
expression: '--1'
out:
error: 'Cannot evaluate expression: expected numeric token at "-1".'
return: 'FAIL'
---
test case: 'Invalid expression "--1" string'
in:
expression: '--"1"'
out:
error: 'Cannot evaluate expression: expected numeric token at "-"1"".'
return: 'FAIL'
---
test case: 'Expression "-"-1"" is valid'
in:
expression: '-"-1"'
out:
value: 1
return: 'SUCCEED'
---
test case: 'Invalid expression "--1" string 3'
in:
expression: '"--1"'
out:
error: 'Cannot evaluate expression: value "--1" is not a numeric operand.'
return: 'FAIL'
---
test case: 'Invalid expression "not1"'
in:
expression: 'not1'
out:
error: 'Cannot evaluate expression: expected numeric token at "not1".'
return: 'FAIL'
---
test case: 'Invalid expression "1not"'
in:
expression: '1not'
out:
error: 'Cannot evaluate expression: expected numeric token at "1not".'
return: 'FAIL'
---
test case: 'Invalid expression "not-1"'
in:
expression: 'not-1'
out:
error: 'Cannot evaluate expression: expected numeric token at "not-1".'
return: 'FAIL'
---
test case: 'Invalid expression "not-1" string'
in:
expression: 'not-"1"'
out:
error: 'Cannot evaluate expression: expected numeric token at "not-"1"".'
return: 'FAIL'
---
test case: 'Invalid expression "-not 1"'
in:
expression: '-not 1'
out:
error: 'Cannot evaluate expression: expected numeric token at "not 1".'
return: 'FAIL'
---
test case: 'Invalid expression "-not 1" string'
in:
expression: '-not "1"'
out:
error: 'Cannot evaluate expression: expected numeric token at "not "1"".'
return: 'FAIL'
---
test case: 'Invalid expression "- not(1)"'
in:
expression: '- not(1)'
out:
error: 'Cannot evaluate expression: expected numeric token at "not(1)".'
return: 'FAIL'
---
test case: 'Invalid expression "not not 1"'
in:
expression: 'not not 1'
out:
error: 'Cannot evaluate expression: expected numeric token at "not 1".'
return: 'FAIL'
---
test case: 'Invalid expression "not not 1" string'
in:
expression: 'not not "1"'
out:
error: 'Cannot evaluate expression: expected numeric token at "not "1"".'
return: 'FAIL'
---
test case: 'Invalid expression "1and 1"'
in:
expression: '1and 1'
out:
error: 'Cannot evaluate expression: expected numeric token at "1and 1".'
return: 'FAIL'
---
test case: 'Invalid expression "1and 1" str 1'
in:
expression: '1and "1"'
out:
error: 'Cannot evaluate expression: expected numeric token at "1and "1"".'
return: 'FAIL'
---
test case: 'Invalid expression "1and 1" str 2'
in:
expression: '"1"and 1'
out:
error: 'Cannot evaluate expression: unexpected token at "and 1".'
return: 'FAIL'
---
test case: 'Invalid expression "1or 1"'
in:
expression: '1or 1'
out:
error: 'Cannot evaluate expression: expected numeric token at "1or 1".'
return: 'FAIL'
---
test case: 'Invalid expression "1or 1" str'
in:
expression: '1or "1"'
out:
error: 'Cannot evaluate expression: expected numeric token at "1or "1"".'
return: 'FAIL'
---
test case: 'Invalid expression "1 or1"'
in:
expression: '1 or1'
out:
error: 'Cannot evaluate expression: unexpected token at "or1".'
return: 'FAIL'
---
test case: 'Invalid expression "1or 1" str'
in:
expression: '"1"or 1'
out:
error: 'Cannot evaluate expression: unexpected token at "or 1".'
return: 'FAIL'
---
test case: 'Invalid expression "1 or1" string'
in:
expression: '"1" or1'
out:
error: 'Cannot evaluate expression: unexpected token at "or1".'
return: 'FAIL'
---
test case: 'Invalid expression "1..2"'
in:
expression: '1..2'
out:
error: 'Cannot evaluate expression: expected numeric token at "1..2".'
return: 'FAIL'
---
test case: 'Invalid expression "1..2" string 1'
in:
expression: '"1"..2'
out:
error: 'Cannot evaluate expression: unexpected token at "..2".'
return: 'FAIL'
---
test case: 'Invalid expression "1..2" string 2'
in:
expression: '1.."2"'
out:
error: 'Cannot evaluate expression: expected numeric token at "1.."2"".'
return: 'FAIL'
---
test case: 'Invalid expression "1..2" string 3'
in:
expression: '"1".."2"'
out:
error: 'Cannot evaluate expression: unexpected token at ".."2"".'
return: 'FAIL'
---
test case: 'Invalid expression "1.K2"'
in:
expression: '1.K2'
out:
error: 'Cannot evaluate expression: expected numeric token at "1.K2".'
return: 'FAIL'
---
test case: 'Invalid expression "1.K2" string 1'
in:
expression: '1.K"2"'
out:
error: 'Cannot evaluate expression: unexpected token at ""2"".'
return: 'FAIL'
---
test case: 'Invalid expression "1.K2" string 2'
in:
expression: '"1".K2'
out:
error: 'Cannot evaluate expression: unexpected token at ".K2".'
return: 'FAIL'
---
test case: 'Invalid expression "1.K2" string 3'
in:
expression: '"1.K2"'
out:
error: 'Cannot evaluate expression: value "1.K2" is not a numeric operand.'
return: 'FAIL'
---
test case: 'Invalid expression "1.K2" string 4'
in:
expression: '"1."K2'
out:
error: 'Cannot evaluate expression: unexpected token at "K2".'
return: 'FAIL'
---
test case: 'Invalid expression "1.2Kand 1"'
in:
expression: '1.2Kand 1'
out:
error: 'Cannot evaluate expression: expected numeric token at "1.2Kand 1".'
return: 'FAIL'
---
test case: 'Invalid expression "1 andnot 1"'
in:
expression: '1 andnot 1'
out:
error: 'Cannot evaluate expression: unexpected token at "andnot 1".'
return: 'FAIL'
---
test case: 'Invalid expression "1 andnot 1" string'
in:
expression: '1 andnot "1"'
out:
error: 'Cannot evaluate expression: unexpected token at "andnot "1"".'
return: 'FAIL'
---
test case: 'Invalid expression "1 andor 1"'
in:
expression: '1 andor 1'
out:
error: 'Cannot evaluate expression: unexpected token at "andor 1".'
return: 'FAIL'
---
test case: 'Invalid expression "1/(5-10/2)"'
in:
expression: '1/(5-10/2)'
out:
error: 'Cannot evaluate expression: division by zero.'
return: 'FAIL'
---
test case: 'Invalid expression "1/(5-10/2)" string'
in:
expression: '"1"/(5-10/2)'
out:
error: 'Cannot evaluate expression: division by zero.'
return: 'FAIL'
---
test case: 'Invalid expression "1/(5-10/2)" string 2'
in:
expression: '1/(5-"10"/2)'
out:
error: 'Cannot evaluate expression: division by zero.'
return: 'FAIL'
---
test case: 'Invalid expression "1/(5-10/2)" string 3'
in:
expression: '1/(5-10/"2")'
out:
error: 'Cannot evaluate expression: division by zero.'
return: 'FAIL'
---
test case: 'Invalid expression "1/(5-10/2)" all strings'
in:
expression: '"1"/("5"-"10"/"2")'
out:
error: 'Cannot evaluate expression: division by zero.'
return: 'FAIL'
---
test case: 'Invalid expression "((((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))))))"'
in:
expression: '((((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))))))' # 33 levels
out:
error: 'Cannot evaluate expression: nesting level is too deep.'
return: 'FAIL'
---
test case: 'Invalid expression "((((((((((((((((((((((((((((((((1))))))))))))))))))))))))))))))))" string'
in:
expression: '(((((((((((((((((((((((((((((((("1"))))))))))))))))))))))))))))))))' # 33 levels
out:
error: 'Cannot evaluate expression: nesting level is too deep.'
return: 'FAIL'
---
test case: 'Invalid expression "-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1))))))))))))))))))))))))))))))))"'
in:
expression: '-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1))))))))))))))))))))))))))))))))' # 33 levels
out:
error: 'Cannot evaluate expression: nesting level is too deep.'
return: 'FAIL'
---
test case: 'Invalid expression "-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1))))))))))))))))))))))))))))))))" string'
in:
expression: '-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-("-1"))))))))))))))))))))))))))))))))' # 33 levels
out:
error: 'Cannot evaluate expression: nesting level is too deep.'
return: 'FAIL'
---
test case: 'Invalid expression "-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-1))))))))))))))))))))))))))))))))" string 2'
in:
expression: '-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-(-"1"))))))))))))))))))))))))))))))))' # 33 levels
out:
error: 'Cannot evaluate expression: nesting level is too deep.'
return: 'FAIL'
...