mirror of
https://github.com/boostorg/hof.git
synced 2026-01-23 17:42:40 +00:00
28 lines
1.1 KiB
C++
28 lines
1.1 KiB
C++
#include "test.h"
|
|
#include <fit/capture.h>
|
|
|
|
// TODO: Test empty capture
|
|
|
|
FIT_TEST_CASE()
|
|
{
|
|
FIT_STATIC_TEST_CHECK(fit::capture(1, 2)(binary_class())() == 3);
|
|
FIT_TEST_CHECK(fit::capture(1, 2)(binary_class())() == 3);
|
|
|
|
FIT_STATIC_TEST_CHECK(fit::capture(1)(binary_class())(2) == 3);
|
|
FIT_TEST_CHECK(fit::capture(1)(binary_class())(2) == 3);
|
|
|
|
static const int one = 1;
|
|
static const int two = 2;
|
|
FIT_STATIC_TEST_CHECK(fit::capture_forward(one, two)(binary_class())() == 3);
|
|
FIT_TEST_CHECK(fit::capture_forward(one, two)(binary_class())() == 3);
|
|
FIT_TEST_CHECK(fit::capture_forward(1, 2)(binary_class())() == 3);
|
|
|
|
FIT_STATIC_TEST_CHECK(fit::capture_forward(one)(binary_class())(two) == 3);
|
|
FIT_TEST_CHECK(fit::capture_forward(1)(binary_class())(2) == 3);
|
|
|
|
FIT_STATIC_TEST_CHECK(fit::capture_decay(1, 2)(binary_class())() == 3);
|
|
FIT_TEST_CHECK(fit::capture_decay(1, 2)(binary_class())() == 3);
|
|
|
|
FIT_STATIC_TEST_CHECK(fit::capture_decay(1)(binary_class())(2) == 3);
|
|
FIT_TEST_CHECK(fit::capture_decay(1)(binary_class())(2) == 3);
|
|
} |