2
0
mirror of https://github.com/boostorg/hof.git synced 2026-01-24 05:52:15 +00:00
Files
hof/test/always.cpp
2015-01-13 00:25:30 -05:00

16 lines
385 B
C++

#include <fit/always.h>
#include <memory>
#include "test.h"
FIT_TEST_CASE()
{
static const int ten = 10;
FIT_STATIC_TEST_CHECK(fit::always(ten)(1,2,3,4,5) == 10);
FIT_TEST_CHECK( fit::always(ten)(1,2,3,4,5) == 10 );
int i = 10;
FIT_TEST_CHECK( fit::always(std::ref(i))(1,2,3,4,5) == 10 );
FIT_TEST_CHECK( &fit::always(std::ref(i))(1,2,3,4,5) == &i );
}