[cig-commits] r9199 - cs/benchmark/cigma/trunk/src/tests

luis at geodynamics.org luis at geodynamics.org
Wed Jan 30 16:18:57 PST 2008


Author: luis
Date: 2008-01-30 16:18:57 -0800 (Wed, 30 Jan 2008)
New Revision: 9199

Modified:
   cs/benchmark/cigma/trunk/src/tests/TestStringUtils.cpp
Log:
Added more pathological cases for parse_dataset_path().
This function still needs to be fixed when one of the
two arguments is missing.

Modified: cs/benchmark/cigma/trunk/src/tests/TestStringUtils.cpp
===================================================================
--- cs/benchmark/cigma/trunk/src/tests/TestStringUtils.cpp	2008-01-31 00:18:55 UTC (rev 9198)
+++ cs/benchmark/cigma/trunk/src/tests/TestStringUtils.cpp	2008-01-31 00:18:57 UTC (rev 9199)
@@ -24,14 +24,22 @@
     {
         string vtkpath = "/path/to/file.vtk:temperature";
         string hdfpath = "/path/to/file.h5:/path/to/dataset";
-        string testpath1 = "/path/to/some/file.ext:foo:bar";
+        string testpath0 = ".:/path/to/file.ext";
+        string testpath1 = "/path/to/file.ext";
         string testpath2 = "/path/to/file.ext:";
+        string testpath3 = "/path/to/file.ext:foo";
+        string testpath4 = "/path/to/file.ext:foo:";
+        string testpath5 = "/path/to/file.ext:foo:bar";
 
         vector<string> paths;
         paths.push_back(vtkpath);
         paths.push_back(hdfpath);
+        paths.push_back(testpath0);
         paths.push_back(testpath1);
         paths.push_back(testpath2);
+        paths.push_back(testpath3);
+        paths.push_back(testpath4);
+        paths.push_back(testpath5);
 
         string path;
         string location, filename, ext;
@@ -44,9 +52,9 @@
 
             parse_dataset_path(path, location, filename, ext);
             cout << "path      = '" << path << "'\n";
+            cout << "location  = '" << location << "'\n";
             cout << "filename  = '" << filename << "'\n";
             cout << "extension = '" << ext << "'\n";
-            cout << "location  = '" << location << "'\n";
 
             path_dirname(location, locdir);
             path_basename(location, locbase);



More information about the cig-commits mailing list