Skip to content

Commit

Permalink
Add tests for always_ref
Browse files Browse the repository at this point in the history
  • Loading branch information
pfultz2 committed Mar 23, 2016
1 parent 40f68b7 commit a2d4aed
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/always.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ FIT_TEST_CASE()
static_assert(std::is_same<decltype(fit::always()(1, 2)), FIT_ALWAYS_VOID_RETURN>::value, "Failed");
}

FIT_TEST_CASE()
{
int i = 10;
FIT_TEST_CHECK( fit::always_ref(i)(1,2,3,4,5) == 10 );
FIT_TEST_CHECK( &fit::always_ref(i)(1,2,3,4,5) == &i );
}

0 comments on commit a2d4aed

Please sign in to comment.