|
|
@ -1242,6 +1242,12 @@ func TestCalcCellValue(t *testing.T) {
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,25%,4)": "41",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,25%,4)": "41",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",109,1,25%,4)": "54",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",109,1,25%,4)": "54",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",110,2,25%,4)": "0",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",110,2,25%,4)": "0",
|
|
|
|
|
|
|
|
// AMORLINC
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,1,20%,4)": "30",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,1,0%,4)": "0",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,20,15%,4)": "0",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,6,15%,4)": "0.6875",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,0,15%,4)": "16.8125",
|
|
|
|
// CUMIPMT
|
|
|
|
// CUMIPMT
|
|
|
|
"=CUMIPMT(0.05/12,60,50000,1,12,0)": "-2294.97753732664",
|
|
|
|
"=CUMIPMT(0.05/12,60,50000,1,12,0)": "-2294.97753732664",
|
|
|
|
"=CUMIPMT(0.05/12,60,50000,13,24,0)": "-1833.1000665738893",
|
|
|
|
"=CUMIPMT(0.05/12,60,50000,13,24,0)": "-1833.1000665738893",
|
|
|
@ -2327,6 +2333,21 @@ func TestCalcCellValue(t *testing.T) {
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,20%,\"\")": "#NUM!",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,20%,\"\")": "#NUM!",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,50%)": "AMORDEGRC requires rate to be < 0.5",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,50%)": "AMORDEGRC requires rate to be < 0.5",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,20%,5)": "invalid basis",
|
|
|
|
"=AMORDEGRC(150,\"01/01/2015\",\"09/30/2015\",20,1,20%,5)": "invalid basis",
|
|
|
|
|
|
|
|
// AMORLINC
|
|
|
|
|
|
|
|
"=AMORLINC()": "AMORLINC requires 6 or 7 arguments",
|
|
|
|
|
|
|
|
"=AMORLINC(\"\",\"01/01/2015\",\"09/30/2015\",20,1,20%)": "AMORLINC requires cost to be number argument",
|
|
|
|
|
|
|
|
"=AMORLINC(-1,\"01/01/2015\",\"09/30/2015\",20,1,20%)": "AMORLINC requires cost >= 0",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"\",\"09/30/2015\",20,1,20%)": "#VALUE!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"\",20,1,20%)": "#VALUE!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"09/30/2015\",\"01/01/2015\",20,1,20%)": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",\"\",1,20%)": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",-1,1,20%)": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,\"\",20%)": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,-1,20%)": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,1,\"\")": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,1,-1)": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,1,20%,\"\")": "#NUM!",
|
|
|
|
|
|
|
|
"=AMORLINC(150,\"01/01/2015\",\"09/30/2015\",20,1,20%,5)": "invalid basis",
|
|
|
|
// CUMIPMT
|
|
|
|
// CUMIPMT
|
|
|
|
"=CUMIPMT()": "CUMIPMT requires 6 arguments",
|
|
|
|
"=CUMIPMT()": "CUMIPMT requires 6 arguments",
|
|
|
|
"=CUMIPMT(0,0,0,0,0,2)": "#N/A",
|
|
|
|
"=CUMIPMT(0,0,0,0,0,2)": "#N/A",
|
|
|
|