Fix harmless signed/unsigned comparison warnings in a test
These warnings appeared after switching to Catch, just use the same type for all variables to avoid them.
This commit is contained in:
@@ -49,7 +49,7 @@ private:
|
|||||||
void RecordingDefaultsTest();
|
void RecordingDefaultsTest();
|
||||||
|
|
||||||
// return the number of values we (attempted to) read
|
// return the number of values we (attempted to) read
|
||||||
int ReadValues(wxConfig *config, bool has_values);
|
size_t ReadValues(wxConfig *config, bool has_values);
|
||||||
|
|
||||||
wxDECLARE_NO_COPY_CLASS(ConfigTestCase);
|
wxDECLARE_NO_COPY_CLASS(ConfigTestCase);
|
||||||
};
|
};
|
||||||
@@ -135,9 +135,9 @@ void ConfigTestCase::ReadWriteLocalTest()
|
|||||||
delete config;
|
delete config;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ConfigTestCase::ReadValues(wxConfig *config, bool has_values)
|
size_t ConfigTestCase::ReadValues(wxConfig *config, bool has_values)
|
||||||
{
|
{
|
||||||
int read = 0;
|
size_t read = 0;
|
||||||
bool r;
|
bool r;
|
||||||
|
|
||||||
wxString string1 = config->Read(wxT("string1"), wxT("abc"));
|
wxString string1 = config->Read(wxT("string1"), wxT("abc"));
|
||||||
@@ -202,7 +202,7 @@ void ConfigTestCase::RecordingDefaultsTest()
|
|||||||
ReadValues(config, false);
|
ReadValues(config, false);
|
||||||
CPPUNIT_ASSERT_EQUAL( 0, config->GetNumberOfEntries() );
|
CPPUNIT_ASSERT_EQUAL( 0, config->GetNumberOfEntries() );
|
||||||
config->SetRecordDefaults(true);
|
config->SetRecordDefaults(true);
|
||||||
int read = ReadValues(config, false);
|
size_t read = ReadValues(config, false);
|
||||||
CPPUNIT_ASSERT_EQUAL( read, config->GetNumberOfEntries() );
|
CPPUNIT_ASSERT_EQUAL( read, config->GetNumberOfEntries() );
|
||||||
ReadValues(config, true);
|
ReadValues(config, true);
|
||||||
config->DeleteAll();
|
config->DeleteAll();
|
||||||
|
@@ -831,7 +831,7 @@ void FileSystemWatcherTestCase::TestTrees()
|
|||||||
{
|
{
|
||||||
CPPUNIT_ASSERT(m_watcher);
|
CPPUNIT_ASSERT(m_watcher);
|
||||||
|
|
||||||
size_t treeitems = 1; // the trunk
|
int treeitems = 1; // the trunk
|
||||||
#if !defined(__WINDOWS__) && !defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
|
#if !defined(__WINDOWS__) && !defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
|
||||||
// When there's no file mask, wxMSW and wxOSX set a single watch
|
// When there's no file mask, wxMSW and wxOSX set a single watch
|
||||||
// on the trunk which is implemented recursively.
|
// on the trunk which is implemented recursively.
|
||||||
@@ -862,7 +862,7 @@ void FileSystemWatcherTestCase::TestTrees()
|
|||||||
// as it was the first time, despite also adding 'child' separately
|
// as it was the first time, despite also adding 'child' separately
|
||||||
// Except that in wxMSW this isn't true: each watch will be a
|
// Except that in wxMSW this isn't true: each watch will be a
|
||||||
// single, recursive dir; so fudge the count
|
// single, recursive dir; so fudge the count
|
||||||
size_t fudge = 0;
|
int fudge = 0;
|
||||||
#if defined(__WINDOWS__) || defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
|
#if defined(__WINDOWS__) || defined(wxHAVE_FSEVENTS_FILE_NOTIFICATIONS)
|
||||||
fudge = 1;
|
fudge = 1;
|
||||||
#endif // __WINDOWS__ || wxHAVE_FSEVENTS_FILE_NOTIFICATIONS
|
#endif // __WINDOWS__ || wxHAVE_FSEVENTS_FILE_NOTIFICATIONS
|
||||||
@@ -903,9 +903,9 @@ void FileSystemWatcherTestCase::TestTrees()
|
|||||||
// and another +1 for "child").
|
// and another +1 for "child").
|
||||||
// On OS X, if we use FSEvents then we still only have 1 watch.
|
// On OS X, if we use FSEvents then we still only have 1 watch.
|
||||||
#ifdef wxHAVE_FSEVENTS_FILE_NOTIFICATIONS
|
#ifdef wxHAVE_FSEVENTS_FILE_NOTIFICATIONS
|
||||||
const size_t treeitems = 1;
|
const int treeitems = 1;
|
||||||
#else
|
#else
|
||||||
const size_t treeitems = subdirs + 2;
|
const int treeitems = subdirs + 2;
|
||||||
#endif
|
#endif
|
||||||
m_watcher->AddTree(dir, wxFSW_EVENT_ALL, "*.txt");
|
m_watcher->AddTree(dir, wxFSW_EVENT_ALL, "*.txt");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user