Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
d3d6feb3
Commit
d3d6feb3
authored
Nov 18, 2016
by
Matthieu Muffato
Browse files
Added tests for the remaining patterns
parent
b838e482
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
t/01.utils/collection.t
t/01.utils/collection.t
+16
-0
No files found.
t/01.utils/collection.t
View file @
d3d6feb3
...
...
@@ -133,7 +133,23 @@ is(@$mix, 1, 'find_all_by_pattern - combined patterns (overlap)');
$mix
=
$collection
->
find_all_by_pattern
(
'
colour==yellow
'
);
is
(
@$mix
,
2
,
'
find_all_by_pattern - selecting by a fields equality
');
$mix
=
$collection
->
find_all_by_pattern
(
'
size!=20
'
);
is
(
@$mix
,
6
,
'
find_all_by_pattern - difference
');
$mix
=
$collection
->
find_all_by_pattern
(
'
dbID>=5
'
);
is
(
@$mix
,
3
,
'
find_all_by_pattern - greater or equal
');
$mix
=
$collection
->
find_all_by_pattern
(
'
dbID<=4
'
);
is
(
@$mix
,
4
,
'
find_all_by_pattern - lower or equal
');
$mix
=
$collection
->
find_all_by_pattern
(
'
size>10
'
);
is
(
@$mix
,
2
,
'
find_all_by_pattern - greater than
');
$mix
=
$collection
->
find_all_by_pattern
(
'
size<5
'
);
is
(
@$mix
,
3
,
'
find_all_by_pattern - greater than
');
$mix
=
$collection
->
find_all_by_pattern
(
'
size<10,colour==orange
'
);
is
(
@$mix
,
5
,
'
find_all_by_pattern - selecting by a fields inequality
');
done_testing
();
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