Update test_optional.cpp

fixed unused variable warnings