Commit f17aa2b8 authored by GoshaZotov's avatar GoshaZotov

add tests for WEIBULL formula

parent 09fe4fdb
......@@ -2455,6 +2455,21 @@ $( function () {
} );
test( "Test: \"WEIBULL\"", function () {
ws.getRange2( "A2" ).setValue( "105" );
ws.getRange2( "A3" ).setValue( "20" );
ws.getRange2( "A4" ).setValue( "100" );
oParser = new parserFormula( "WEIBULL(A2,A3,A4,TRUE)", "A20", ws );
ok( oParser.parse() );
strictEqual( oParser.calculate().getValue().toFixed(6) - 0, 0.929581 );
oParser = new parserFormula( "WEIBULL(A2,A3,A4,FALSE)", "A20", ws );
ok( oParser.parse(), "WEIBULL(A2,A3,A4,FALSE)" );
strictEqual( oParser.calculate().getValue().toFixed(6) - 0, 0.035589 );
} );
test( "Test: \"YEARFRAC\"", function () {
function okWrapper( a, b ) {
ok( Math.abs( a - b ) < dif );
......
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