Enhancement - Path integration
- Implemented Path::operator (std::string) const, to provide an automatic cast to std::string for any Path, File or Directory. - Made use of new cast in various code. - Changed use of spaces in atoi () calls. - Switched from std::string::data () to std::string::c_str () calls.
This commit is contained in:
@@ -33,7 +33,7 @@ Context context;
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (20);
|
||||
UnitTest t (21);
|
||||
|
||||
// Directory (const File&);
|
||||
// Directory (const Path&);
|
||||
@@ -55,6 +55,9 @@ int main (int argc, char** argv)
|
||||
Directory d5 = d4;
|
||||
t.is (d5.data, "/tmp/test_directory", "Directory::operator=");
|
||||
|
||||
// operator (std::string) const;
|
||||
t.is ((std::string) d3, "/tmp", "Directory::operator (std::string) const");
|
||||
|
||||
// virtual bool create ();
|
||||
t.ok (d5.create (), "Directory::create /tmp/test_directory");
|
||||
t.ok (d5.exists (), "Directory::exists /tmp/test_directory");
|
||||
|
||||
Reference in New Issue
Block a user