diff --git a/test/function_n_test.cpp b/test/function_n_test.cpp index 9cc13ed..a39a70b 100644 --- a/test/function_n_test.cpp +++ b/test/function_n_test.cpp @@ -73,16 +73,18 @@ test_zero_args() v1 = three; BOOST_TEST(!v1.empty()); - // Invocation + // Invocation and self-assignment global_int = 0; + v1 = v1; v1(); BOOST_TEST(global_int == 3); // Assignment to a non-empty function v1 = five; - // Invocation + // Invocation and self-assignment global_int = 0; + v1.set(v1); v1(); BOOST_TEST(global_int == 5); diff --git a/test/function_test.cpp b/test/function_test.cpp index 2f734ff..55d448d 100644 --- a/test/function_test.cpp +++ b/test/function_test.cpp @@ -73,16 +73,18 @@ test_zero_args() v1 = three; BOOST_TEST(!v1.empty()); - // Invocation + // Invocation and self-assignment global_int = 0; + v1 = v1; v1(); BOOST_TEST(global_int == 3); // Assignment to a non-empty function v1 = five; - // Invocation + // Invocation and self-assignment global_int = 0; + v1.set(v1); v1(); BOOST_TEST(global_int == 5);