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 (5);
|
||||
UnitTest t (6);
|
||||
|
||||
File::write ("/tmp/file.t.txt", "This is a test\n");
|
||||
File f6 ("/tmp/file.t.txt");
|
||||
@@ -41,6 +41,9 @@ int main (int argc, char** argv)
|
||||
t.ok (f6.mode () & S_IRUSR, "File::mode /tmp/file.t.txt good");
|
||||
t.ok (File::remove ("/tmp/file.t.txt"), "File::remove /tmp/file.t.txt good");
|
||||
|
||||
// operator (std::string) const;
|
||||
t.is ((std::string) f6, "/tmp/file.t.txt", "File::operator (std::string) const");
|
||||
|
||||
t.ok (File::create ("/tmp/file.t.create"), "File::create /tmp/file.t.create good");
|
||||
t.ok (File::remove ("/tmp/file.t.create"), "File::remove /tmp/file.t.create good");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user