cardinality::[ { name:"cardinality valid cases{param:\"`[]`\",result:0}", statement:"cardinality(`[]`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:0 } }, { name:"cardinality valid cases{param:\"<<>>\",result:0}", statement:"cardinality(<<>>)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:0 } }, { name:"cardinality valid cases{param:\"`{}`\",result:0}", statement:"cardinality(`{}`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:0 } }, { name:"cardinality valid cases{param:\"`[1]`\",result:1}", statement:"cardinality(`[1]`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"<<1>>\",result:1}", statement:"cardinality(<<1>>)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"`{a: 1}`\",result:1}", statement:"cardinality(`{a: 1}`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"`[1, 1.0]`\",result:2}", statement:"cardinality(`[1, 1.0]`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:2 } }, { name:"cardinality valid cases{param:\"<<1, 2, 3>>\",result:3}", statement:"cardinality(<<1, 2, 3>>)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:3 } }, { name:"cardinality valid cases{param:\"`{a: 1, b: foo}`\",result:2}", statement:"cardinality(`{a: 1, b: foo}`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:2 } }, { name:"cardinality valid cases{param:\"`[[], [1,2,3,4,[5,6], ()], ({a: 1, b: 2})]`\",result:3}", statement:"cardinality(`[[], [1,2,3,4,[5,6], ()], ({a: 1, b: 2})]`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:3 } }, { name:"cardinality valid cases{param:\"`{a: 1, a: 2}`\",result:2}", statement:"cardinality(`{a: 1, a: 2}`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:2 } }, { name:"cardinality valid cases{param:\"`[null]`\",result:1}", statement:"cardinality(`[null]`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"<>\",result:1}", statement:"cardinality(<>)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"`{a: null}`\",result:1}", statement:"cardinality(`{a: null}`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"`[missing]`\",result:1}", statement:"cardinality(`[missing]`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"<>\",result:1}", statement:"cardinality(<>)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality valid cases{param:\"`{a: missing}`\",result:1}", statement:"cardinality(`{a: missing}`)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:1 } }, { name:"cardinality null and missing propagation{param:\"null\"}", statement:"cardinality(null)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:null } }, { name:"cardinality null and missing propagation{param:\"missing\"}", statement:"cardinality(missing)", assert:{ result:EvaluationSuccess, evalMode:[ EvalModeCoerce, EvalModeError ], output:$missing::null } }, { name:"CARDINALITY('foo') type mismatch", statement:"CARDINALITY('foo')", assert: [ { evalMode: EvalModeError, result:EvaluationFail, }, { result:EvaluationSuccess, evalMode: EvalModeCoerce, output:$missing::null } ] } ]