Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
0f48d204
Commit
0f48d204
authored
Oct 19, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(utils.spec.qml): add tests on `times`
parent
5d65384b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
utils.spec.qml
tests/ui/scripts/Utils/utils.spec.qml
+27
-0
No files found.
tests/ui/scripts/Utils/utils.spec.qml
View file @
0f48d204
...
...
@@ -95,6 +95,33 @@ TestCase {
// -----------------------------------------------------------------
function
test_times1_data
()
{
return
[
{
cb
:
function
(
n
)
{
return
n
*
2
},
n
:
10
,
output
:
[
0
,
2
,
4
,
6
,
8
,
10
,
12
,
14
,
16
,
18
]
},
{
cb
:
function
(
n
)
{
return
n
%
2
?
1
:
0
},
n
:
10
,
output
:
[
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
,
0
,
1
]
}
]
}
function
test_times1
(
data
)
{
compare
(
Utils
.
times
(
data
.
n
,
data
.
cb
),
data
.
output
)
}
function
test_times2
()
{
var
sum
=
0
Utils
.
times
(
5
,
function
(
i
)
{
sum
+=
(
i
+
1
)
})
compare
(
sum
,
15
)
}
// -----------------------------------------------------------------
function
test_isString_data
()
{
return
[
{
input
:
'
foo
'
,
output
:
true
},
...
...
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