1 | test_zero = ->
|
2 | run_test [
|
3 | "zero(2,2)",
|
4 | "[[0,0],[0,0]]",
|
5 |
|
6 | "zero(1,1)",
|
7 | "[[0]]",
|
8 |
|
9 | "zero(1)",
|
10 | "[0]",
|
11 |
|
12 | "zero(2)",
|
13 | "[0,0]",
|
14 |
|
15 | "zero(1,2)",
|
16 | "[[0,0]]",
|
17 |
|
18 | "zero(2,1)",
|
19 | "[[0],[0]]",
|
20 |
|
21 | "zero(0)",
|
22 | "0",
|
23 |
|
24 | "zero(0,0)",
|
25 | "0",
|
26 |
|
27 | # it's relevant to handle the case of tensor
|
28 | # being passed because if you type
|
29 | # 2
|
30 | # zero
|
31 | # > (0,0)
|
32 | # zero # now the last result is passed to zero
|
33 | # > 0 # (0,0) being passed, but it's handled!
|
34 | # before some adjustments this used to crash.
|
35 | # And it happened to me, so it can happen.
|
36 | "zero([2,3])",
|
37 | "0",
|
38 |
|
39 | ]
|