mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-26 09:56:32 +08:00
Add a trivial unit test of wxFSVolumeBase
Test that we can at least create it.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user