mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
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:
parent
a6875ced6e
commit
e53ba8110b
9 changed files with 35 additions and 18 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue