Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Boris Kocherov
sdkjs
Commits
e5d5c0b9
Commit
e5d5c0b9
authored
7 years ago
by
GoshaZotov
Browse files
Options
Download
Email Patches
Plain Diff
add tests for ZTEST formula
parent
95777ba8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
cell/.unit-tests/FormulaTests.js
cell/.unit-tests/FormulaTests.js
+30
-0
No files found.
cell/.unit-tests/FormulaTests.js
View file @
e5d5c0b9
...
@@ -1037,6 +1037,36 @@ $( function () {
...
@@ -1037,6 +1037,36 @@ $( function () {
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
5
)
-
0
,
0.19602
,
"
T.TEST(A2:A10,B2:B10,2,1)
"
);
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
5
)
-
0
,
0.19602
,
"
T.TEST(A2:A10,B2:B10,2,1)
"
);
}
);
}
);
test
(
"
Test:
\"
ZTEST
\"
"
,
function
()
{
ws
.
getRange2
(
"
A2
"
).
setValue
(
"
3
"
);
ws
.
getRange2
(
"
A3
"
).
setValue
(
"
6
"
);
ws
.
getRange2
(
"
A4
"
).
setValue
(
"
7
"
);
ws
.
getRange2
(
"
A5
"
).
setValue
(
"
8
"
);
ws
.
getRange2
(
"
A6
"
).
setValue
(
"
6
"
);
ws
.
getRange2
(
"
A7
"
).
setValue
(
"
5
"
);
ws
.
getRange2
(
"
A8
"
).
setValue
(
"
4
"
);
ws
.
getRange2
(
"
A9
"
).
setValue
(
"
2
"
);
ws
.
getRange2
(
"
A10
"
).
setValue
(
"
1
"
);
ws
.
getRange2
(
"
A11
"
).
setValue
(
"
9
"
);
oParser
=
new
parserFormula
(
"
ZTEST(A2:A11,4)
"
,
"
A1
"
,
ws
);
ok
(
oParser
.
parse
(),
"
ZTEST(A2:A11,4)
"
);
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
6
)
-
0
,
0.090574
,
"
ZTEST(A2:A11,4)
"
);
oParser
=
new
parserFormula
(
"
2 * MIN(ZTEST(A2:A11,4), 1 - ZTEST(A2:A11,4))
"
,
"
A1
"
,
ws
);
ok
(
oParser
.
parse
(),
"
2 * MIN(ZTEST(A2:A11,4), 1 - ZTEST(A2:A11,4))
"
);
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
6
)
-
0
,
0.181148
,
"
2 * MIN(ZTEST(A2:A11,4), 1 - ZTEST(A2:A11,4))
"
);
oParser
=
new
parserFormula
(
"
ZTEST(A2:A11,6)
"
,
"
A1
"
,
ws
);
ok
(
oParser
.
parse
(),
"
ZTEST(A2:A11,6)
"
);
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
6
)
-
0
,
0.863043
,
"
ZTEST(A2:A11,6)
"
);
oParser
=
new
parserFormula
(
"
2 * MIN(ZTEST(A2:A11,6), 1 - ZTEST(A2:A11,6))
"
,
"
A1
"
,
ws
);
ok
(
oParser
.
parse
(),
"
2 * MIN(ZTEST(A2:A11,6), 1 - ZTEST(A2:A11,6))
"
);
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
6
)
-
0
,
0.273913
,
"
2 * MIN(ZTEST(A2:A11,6), 1 - ZTEST(A2:A11,6))
"
);
}
);
test
(
"
Test:
\"
F.DIST
\"
"
,
function
()
{
test
(
"
Test:
\"
F.DIST
\"
"
,
function
()
{
ws
.
getRange2
(
"
A2
"
).
setValue
(
"
15.2069
"
);
ws
.
getRange2
(
"
A2
"
).
setValue
(
"
15.2069
"
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment