envs::{ d:3., f:2e0, i:1, } nary::[ { name:"unaryPlus", statement:"+i", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:1 } }, { name:"unaryMinus", statement:"-f", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:-2e0 } }, { name:"binaryAddWith2Terms", statement:"1 + 1", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:2 } }, { name:"binaryAddWith3Terms", statement:"1 + 1 + 1", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:3 } }, { name:"addIntFloat", statement:"i + f", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:3e0 } }, { name:"subIntFloatDecimal", statement:"i - f - d", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:-4. } }, { name:"repeatingDecimal", statement:"4.0000 / 3.0", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:1.3333333333333333333333333333333333333 } }, { name:"repeatingDecimalHigherPrecision", statement:"4.000000000000000000000000000000000000/3.0", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:1.3333333333333333333333333333333333333 } }, { name:"divDecimalInt", statement:"d / 2", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:1.5 } }, { name:"subtractionOutOfAllowedPrecision", statement:"1e100 - 1e-100", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:10000000000000000000000000000000000000d63 } }, { name:"bigDecimals", statement:"9223372036854775807.0 + 100.0", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:9223372036854775907.0 } }, { name:"mulFloatIntInt", statement:"f * 2 * 4", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:16e0 } }, { name:"modIntInt", statement:"3 % 2", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:1 } }, { name:"equalIntFloat", statement:"1 = 1e0", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalIntFloatFalse", statement:"1 = 1e1", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"notEqualIntInt", statement:"1 != 2", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"notEqualIntFloat", statement:"1 != `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"notEqualIntFloatFalse", statement:"1 != `1e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"equalListDifferentTypesTrue", statement:"[1, `2e0`, 'hello'] = [1.0, 2, `hello`]", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalListDifferentTypesWithNullMissingTrue", statement:"[1, `2e0`, 'hello', NULL, MISSING] = [1.0, 2, `hello`, NULL, MISSING]", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalListDifferentTypesWithNullMissingEquivalenceTrue", statement:"[1, `2e0`, 'hello', NULL] = [1.0, 2, `hello`, MISSING]", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"listDifferentTypesDifferentOrderFalse", statement:"[1, `2e0`, 'hello'] = [`hello`, 2, 1.0]", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"equalBagDifferentTypesDifferentOrderTrue", statement:"<<1, `2e0`, 'hello'>> = <<`hello`, 2, 1.0>>", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalBagDifferentTypesWithNullMissingDifferentOrderTrue", statement:"<<1, `2e0`, 'hello', NULL, MISSING>> = <>", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalListDifferentLengthsShortFirst", statement:"[1.0, 2] = [1.0, 2, `hello`]", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"equalListDifferentLengthsLongFirst", statement:"[1, `2e0`, 'hello'] = [1, `2e0`]", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"equalTuplesDifferentTypesTrue", statement:"{'a': 1, 'a': 10.0, 'b': `2e0`} = {'a': 1.0, 'a': 10, 'b': 2}", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalTuplesDifferentTypesDifferentOrderTrue", statement:"{'a': 1, 'a': 10.0, 'b': `2e0`} = {'b': 2, 'a': 10, 'a': 1.0}", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalTuplesDifferentTypesDifferentOrderWithNullMissingTrue", statement:"{'a': 1, 'a': 10.0, 'b': `2e0`, 'c': NULL, 'd': MISSING} = {'d': MISSING, 'c': NULL, 'b': 2, 'a': 10, 'a': 1.0}", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"equalTuplesDifferentTypesDifferentOrderWithNullMissingEquivalenceFalse", statement:"{'a': 1, 'a': 10.0, 'b': `2e0`, 'c': NULL, 'd': NULL} = {'d': MISSING, 'c': MISSING, 'b': 2, 'a': 10, 'a': 1.0}", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"symbolEquality", statement:"'A' = 'A'", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"symbolCaseEquality", statement:"'A' = 'a'", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"moreIntFloat", statement:"3 > `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"moreIntFloatFalse", statement:"1 > `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"lessIntFloat", statement:"1 < `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"lessIntFloatFalse", statement:"3 < `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"moreEqIntFloat", statement:"3 >= `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"moreEqIntFloatFalse", statement:"1 >= `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } }, { name:"lessEqIntFloat", statement:"1 <= `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:true } }, { name:"lessEqIntFloatFalse", statement:"5 <= `2e0`", assert:{ evalMode:[EvalModeCoerce, EvalModeError], result:EvaluationSuccess, output:false } } ]