summaryrefslogtreecommitdiff
path: root/calc_test.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-04-04 00:21:33 +0800
committerxuri <xuri.me@gmail.com>2022-04-04 00:21:33 +0800
commitecbc6e2fde1941cb5ac9e5f3bfce329e7bfa8825 (patch)
tree24597853107787b521fc98263f19c242ac2be6f5 /calc_test.go
parentbe8fc0a4c5795bb793b171c25fd90e0369812a05 (diff)
ref #65, new formula functions: T.INV and T.INV.2T
- Typo fixed
Diffstat (limited to 'calc_test.go')
-rw-r--r--calc_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/calc_test.go b/calc_test.go
index 6324344..8565038 100644
--- a/calc_test.go
+++ b/calc_test.go
@@ -1167,6 +1167,12 @@ func TestCalcCellValue(t *testing.T) {
// TDIST
"=TDIST(1,10,1)": "0.17044656615103",
"=TDIST(1,10,2)": "0.34089313230206",
+ // T.INV
+ "=T.INV(0.25,10)": "-0.699812061312432",
+ "=T.INV(0.75,10)": "0.699812061312432",
+ // T.INV.2T
+ "=T.INV.2T(1,10)": "0",
+ "=T.INV.2T(0.5,10)": "0.699812061312432",
// TRIMMEAN
"=TRIMMEAN(A1:B4,10%)": "2.5",
"=TRIMMEAN(A1:B4,70%)": "2.5",
@@ -3048,6 +3054,19 @@ func TestCalcCellValue(t *testing.T) {
"=TDIST(-1,10,1)": "#NUM!",
"=TDIST(1,0,1)": "#NUM!",
"=TDIST(1,10,0)": "#NUM!",
+ // T.INV
+ "=T.INV()": "T.INV requires 2 arguments",
+ "=T.INV(\"\",10)": "strconv.ParseFloat: parsing \"\": invalid syntax",
+ "=T.INV(0.25,\"\")": "strconv.ParseFloat: parsing \"\": invalid syntax",
+ "=T.INV(0,10)": "#NUM!",
+ "=T.INV(1,10)": "#NUM!",
+ "=T.INV(0.25,0.5)": "#NUM!",
+ // T.INV.2T
+ "=T.INV.2T()": "T.INV.2T requires 2 arguments",
+ "=T.INV.2T(\"\",10)": "strconv.ParseFloat: parsing \"\": invalid syntax",
+ "=T.INV.2T(0.25,\"\")": "strconv.ParseFloat: parsing \"\": invalid syntax",
+ "=T.INV.2T(0,10)": "#NUM!",
+ "=T.INV.2T(0.25,0.5)": "#NUM!",
// TRIMMEAN
"=TRIMMEAN()": "TRIMMEAN requires 2 arguments",
"=TRIMMEAN(A1,\"\")": "strconv.ParseFloat: parsing \"\": invalid syntax",