Add a trivial unit test of wxFSVolumeBase

Test that we can at least create it.
This commit is contained in:
Vadim Zeitlin
2025-06-03 02:03:24 +02:00
parent 6e8eac94ab
commit 5c86faa94a
+22
View File
@@ -537,3 +537,25 @@ bool wxIsExecutable(const wxString &path);
*/
#endif // wxUSE_FILE
#if wxUSE_FSVOLUME
#include "wx/volume.h"
TEST_CASE("FSVolume", "[fs][volume]")
{
wxFSVolumeBase vol;
CHECK( !vol.IsOk() );
const auto& volumes = wxFSVolumeBase::GetVolumes();
if ( volumes.empty() )
{
WARN("No volumes found, skipping wxFSVolume tests.");
return;
}
vol.Create(volumes[0]);
REQUIRE( vol.IsOk() );
}
#endif // wxUSE_FSVOLUME