Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
a82821df
Commit
a82821df
authored
7 years ago
by
GoshaZotov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add tests for TREND formula
parent
35b93f3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
cell/.unit-tests/FormulaTests.js
cell/.unit-tests/FormulaTests.js
+44
-0
No files found.
cell/.unit-tests/FormulaTests.js
View file @
a82821df
...
...
@@ -9149,6 +9149,50 @@ $( function () {
}
);
test
(
"
Test:
\"
TREND
\"
"
,
function
()
{
ws
.
getRange2
(
"
A101
"
).
setValue
(
"
1
"
);
ws
.
getRange2
(
"
A102
"
).
setValue
(
"
2
"
);
ws
.
getRange2
(
"
A103
"
).
setValue
(
"
3
"
);
ws
.
getRange2
(
"
A104
"
).
setValue
(
"
4
"
);
ws
.
getRange2
(
"
A105
"
).
setValue
(
"
5
"
);
ws
.
getRange2
(
"
A106
"
).
setValue
(
"
6
"
);
ws
.
getRange2
(
"
A107
"
).
setValue
(
"
7
"
);
ws
.
getRange2
(
"
A108
"
).
setValue
(
"
8
"
);
ws
.
getRange2
(
"
A109
"
).
setValue
(
"
9
"
);
ws
.
getRange2
(
"
A110
"
).
setValue
(
"
10
"
);
ws
.
getRange2
(
"
A111
"
).
setValue
(
"
11
"
);
ws
.
getRange2
(
"
A112
"
).
setValue
(
"
12
"
);
ws
.
getRange2
(
"
B101
"
).
setValue
(
"
133890
"
);
ws
.
getRange2
(
"
B102
"
).
setValue
(
"
135000
"
);
ws
.
getRange2
(
"
B103
"
).
setValue
(
"
135790
"
);
ws
.
getRange2
(
"
B104
"
).
setValue
(
"
137300
"
);
ws
.
getRange2
(
"
B105
"
).
setValue
(
"
138130
"
);
ws
.
getRange2
(
"
B106
"
).
setValue
(
"
139100
"
);
ws
.
getRange2
(
"
B107
"
).
setValue
(
"
139900
"
);
ws
.
getRange2
(
"
B108
"
).
setValue
(
"
141120
"
);
ws
.
getRange2
(
"
B109
"
).
setValue
(
"
141890
"
);
ws
.
getRange2
(
"
B110
"
).
setValue
(
"
143230
"
);
ws
.
getRange2
(
"
B111
"
).
setValue
(
"
144000
"
);
ws
.
getRange2
(
"
B112
"
).
setValue
(
"
145290
"
);
ws
.
getRange2
(
"
A115
"
).
setValue
(
"
13
"
);
ws
.
getRange2
(
"
A116
"
).
setValue
(
"
14
"
);
ws
.
getRange2
(
"
A117
"
).
setValue
(
"
15
"
);
ws
.
getRange2
(
"
A118
"
).
setValue
(
"
16
"
);
ws
.
getRange2
(
"
A119
"
).
setValue
(
"
17
"
);
oParser
=
new
parserFormula
(
"
TREND(A101:A112,B101:B112)
"
,
"
A2
"
,
ws
);
ok
(
oParser
.
parse
()
);
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
9
)
-
0
,
0.947729865
);
oParser
=
new
parserFormula
(
"
TREND(B101:B112,A101:A112,A115:A119)
"
,
"
A2
"
,
ws
);
ok
(
oParser
.
parse
()
);
strictEqual
(
oParser
.
calculate
().
getValue
().
toFixed
(
4
)
-
0
,
146171.5152
);
}
);
wb
.
dependencyFormulas
.
unlockRecal
();
}
);
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