given( $n = 0, $k = 0, $withoutZero = false ) ->when($result = CUT::Γ($n, $k, $withoutZero)) ->then ->array($result) ->isEmpty(); } public function case_n2_k3() { $this ->given( $n = 2, $k = 3, $withoutZero = false ) ->when($result = CUT::Γ($n, $k, $withoutZero)) ->then ->array($result) ->isEqualTo([ [3, 0], [2, 1], [1, 2], [0, 3] ]); } public function case_n3_k2() { $this ->given( $n = 3, $k = 2, $withoutZero = false ) ->when($result = CUT::Γ($n, $k, $withoutZero)) ->then ->array($result) ->isEqualTo([ [2, 0, 0], [1, 1, 0], [1, 0, 1], [0, 2, 0], [0, 1, 1], [0, 0, 2] ]); } public function case_n2_k3_without_zero() { $this ->given( $n = 2, $k = 3, $withoutZero = true ) ->when($result = CUT::Γ($n, $k, $withoutZero)) ->then ->array($result) ->isEqualTo([ [2, 1], [1, 2] ]); } public function case_n3_k2_without_zero() { $this ->given( $n = 3, $k = 2, $withoutZero = true ) ->when($result = CUT::Γ($n, $k, $withoutZero)) ->then ->array($result) ->isEmpty(); } }