Skip to content

Commit

Permalink
fixed flatmap tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrannell1 committed Jun 30, 2014
1 parent ad80ea4 commit cb1c783
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions tests/test-xFlatMap.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ message("xFlatMap")

describe("flatmap of empty collection is always empty") +
holdsWhen(
is.function(fn) && is_collection(coll) && length(coll) == 0,
xFlatMap(fn, coll) %is% list()
is_collection(coll) && length(coll) == 0 && !is_named(coll),
xFlatMap(identity, coll) %is% list()
) +

describe("flatmap of empty collection is always empty (named)") +
holdsWhen(
is_collection(coll) && length(coll) == 0 && is_named(coll),
xFlatMap(identity, coll) %is% as_named(list())
) +

describe("flatmap with identity is the coll") +
Expand Down
1 change: 0 additions & 1 deletion tests/test-xIsNan.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

kiwi ::: load_test_dependencies(environment())


message("xIsNan (+)")

over(val) +
Expand Down

0 comments on commit cb1c783

Please sign in to comment.