From d9513442b56478007750a511123c8cdd3728feb2 Mon Sep 17 00:00:00 2001 From: Crzyrndm Date: Sat, 7 Jul 2018 17:57:41 +1200 Subject: [PATCH] test for overloaded operator=(T) Issue #300 --- tests/utils/optional_tests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/utils/optional_tests.cpp b/tests/utils/optional_tests.cpp index b17cbecb..7af72a20 100644 --- a/tests/utils/optional_tests.cpp +++ b/tests/utils/optional_tests.cpp @@ -242,6 +242,10 @@ public: test_opt.set(test_val3); xlnt_assert(test_opt.is_set()); xlnt_assert_equals(test_opt.get(), test_val3); + // operator= set + xlnt::optional test_opt2; + test_opt2 = test_val1; + xlnt_assert_equals(test_opt2.get(), test_val1); } { // lifetime checks xlnt::optional test_opt;