Skip to content

Commit

Permalink
Update delegate0_test.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
oktonion committed Sep 5, 2024
1 parent 44109c5 commit 5ceb1f5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/delegate0_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,31 @@ TEST_CASE("Testing cpp delegate 0") {
CHECK_FALSE(d0_other < d0);
}

{
Test t;
d0_other = delegate<void>(&t, &Test::call);

CHECK_FALSE(d0_other == d0);
CHECK(d0_other != d0);

d0 = delegate<void>(&t, &Test::call);

CHECK(d0_other == d0);
CHECK_FALSE(d0_other != d0);
CHECK_FALSE(d0_other < d0);

d0 = delegate<void>(&t, &Test::call_const);

CHECK_FALSE(d0_other == d0);
CHECK(d0_other != d0);

d0_other = delegate<void>(&t, &Test::call_const);

CHECK(d0_other == d0);
CHECK_FALSE(d0_other != d0);
CHECK_FALSE(d0_other < d0);
}

func = &tmpl_void_func<float>;
d0_other = delegate<void>(func);

Expand Down

0 comments on commit 5ceb1f5

Please sign in to comment.