Add 64-bit integers support to wxConfig

Serialize them to strings in wxFileConfig, just as we always did for
long, but use wxRegKey support for storing them directly to the registry
in wxRegConfig.
This commit is contained in:
Vadim Zeitlin
2021-03-09 21:17:26 +01:00
parent 3f2c84d4a9
commit fce8780297
10 changed files with 164 additions and 3 deletions

View File

@@ -626,5 +626,18 @@ TEST_CASE("wxFileConfig::ReadFloat", "[fileconfig][config]")
CHECK( f == -9876.5432f );
}
TEST_CASE("wxFileConfig::LongLong", "[fileconfig][config][longlong]")
{
wxFileConfig fc("", "", "", "", 0); // Don't use any files.
// See comment near val64 definition in regconf.cpp.
const wxLongLong_t val = wxLL(0x8000000000000008);
REQUIRE( fc.Write("ll", val) );
wxLongLong_t ll;
REQUIRE( fc.Read("ll", &ll) );
CHECK( ll == val );
}
#endif // wxUSE_FILECONFIG