Commit 63b1d5b7 authored by GoshaZotov's avatar GoshaZotov

add some tests for GROWTH

parent b919814d
......@@ -9114,6 +9114,39 @@ $( function () {
oParser = new parserFormula( "GROWTH(B102:B107,A102:A107)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(5) - 0, 32618.20377);
oParser = new parserFormula( "GROWTH(A102:C102,A103:C104,A105:C106,1)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 11.00782679);
oParser = new parserFormula( "GROWTH(A102:C102,A103:C104,A105:C106,1)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 11.00782679);
oParser = new parserFormula( "GROWTH(A103:C103,A104:C105,A106:C107,1)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 12.00187209);
oParser = new parserFormula( "GROWTH(A103:C103,A104:C105,A106:C107,10)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 12.00187209);
oParser = new parserFormula( "GROWTH(A103:C103,A104:C105,A106:C107,0)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 1.0017632);
oParser = new parserFormula( "GROWTH({1,2,3},A104:C105,A106:C107,1)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 1.00038318);
oParser = new parserFormula( "GROWTH({1,2,3},A104:C105,A106:C107,A106:C107)", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue(), "#VALUE!");
/*oParser = new parserFormula( "GROWTH({3,4,5,6,7})", "A2", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(8) - 0, 3.14681449);*/
} );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment