Quoting ErCiccione (2021-01-27 11:14:21)
> Another Monero dev (Xiphon) has offered a different possible solution on IRC 
> (Freenode: #monero-dev):
> 
> according to the Debian's build log, boost::optional is not missing. also i'm 
> sure it is installed as a dependency. for example, they have 
> libboost-chrono-dev in their package list and it depends on libboost-dev thus 
> i don't think the issue is caused by missing boost::optional
> it might be another reason, version mismatch or something... But looking at 
> the test case, i would just do something like
> 
> --- a/tests/unit_tests/wipeable_string.cpp
> +++ b/tests/unit_tests/wipeable_string.cpp
> @@ -189,20 +189,20 @@ TEST(wipeable_string, parse_hexstr)
>  {
>    boost::optional<epee::wipeable_string> s;
>  
> 
> -  ASSERT_EQ(boost::none, epee::wipeable_string("x").parse_hexstr());
> -  ASSERT_EQ(boost::none, 
> epee::wipeable_string("x0000000000000000").parse_hexstr());
> -  ASSERT_EQ(boost::none, 
> epee::wipeable_string("0000000000000000x").parse_hexstr());
> -  ASSERT_EQ(boost::none, epee::wipeable_string("0").parse_hexstr());
> -  ASSERT_EQ(boost::none, epee::wipeable_string("000").parse_hexstr());
> +  ASSERT_TRUE(boost::none == epee::wipeable_string("x").parse_hexstr());
> +  ASSERT_TRUE(boost::none == 
> epee::wipeable_string("x0000000000000000").parse_hexstr());
> +  ASSERT_TRUE(boost::none == 
> epee::wipeable_string("0000000000000000x").parse_hexstr());
> +  ASSERT_TRUE(boost::none == epee::wipeable_string("0").parse_hexstr());
> +  ASSERT_TRUE(boost::none == epee::wipeable_string("000").parse_hexstr());
>  
> 
>    ASSERT_TRUE((s = epee::wipeable_string("").parse_hexstr()) != boost::none);
> -  ASSERT_EQ(*s, "");
> +  ASSERT_TRUE(*s == "");
>    ASSERT_TRUE((s = epee::wipeable_string("00").parse_hexstr()) != 
> boost::none);
> -  ASSERT_EQ(*s, epee::wipeable_string("", 1));
> +  ASSERT_TRUE(*s == epee::wipeable_string("", 1));
>    ASSERT_TRUE((s = epee::wipeable_string("41").parse_hexstr()) != 
> boost::none);
> -  ASSERT_EQ(*s, epee::wipeable_string("A"));
> +  ASSERT_TRUE(*s == epee::wipeable_string("A"));
>    ASSERT_TRUE((s = epee::wipeable_string("414243").parse_hexstr()) != 
> boost::none);
> -  ASSERT_EQ(*s, epee::wipeable_string("ABC"));
> +  ASSERT_TRUE(*s == epee::wipeable_string("ABC"));
>  }
>  
> 
>  TEST(wipeable_string, to_hex)
> 
> should fix the issue

Thanks. Works!


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private

Attachment: signature.asc
Description: signature

Reply via email to