test/VersionDictionary_test.cpp
changeset 8 21a6c17f4e3e
parent 0 31a43d94cc26
child 9 629f61203db1
     1.1 --- a/test/VersionDictionary_test.cpp	Sun Sep 20 15:14:12 2009 -0700
     1.2 +++ b/test/VersionDictionary_test.cpp	Mon Sep 28 23:39:08 2009 -0700
     1.3 @@ -46,16 +46,16 @@
     1.4  
     1.5  TEST(File,HasPath) {
     1.6      {
     1.7 -        File f("/tmp/jubba", O_RDWR | O_CREAT | O_TRUNC);
     1.8 +        File f("/tmp/jubba", O_RDWR | O_CREAT | O_TRUNC, true);
     1.9          f.write("howdy");
    1.10      }
    1.11      {
    1.12 -        File f("/tmp/jubba", O_RDWR);
    1.13 +        File f("/tmp/jubba", O_RDWR, true);
    1.14          EXPECT_TRUE(f.hasPath("/tmp/jubba"));
    1.15          File::unlink("/tmp/jubba");
    1.16          EXPECT_FALSE(f.hasPath("/tmp/jubba"));
    1.17 -        
    1.18 -        File f2("/tmp/jubba", O_RDWR | O_CREAT | O_TRUNC);
    1.19 +
    1.20 +        File f2("/tmp/jubba", O_RDWR | O_CREAT | O_TRUNC, true);
    1.21          f2.write("howdy");
    1.22          f2.flush();
    1.23  
    1.24 @@ -108,7 +108,7 @@
    1.25      time_t startTime = ::time(NULL);
    1.26      time_t createTime;
    1.27      {
    1.28 -        File file("/tmp/hashfiletest", O_RDWR | O_CREAT | O_TRUNC);
    1.29 +        File file("/tmp/hashfiletest", O_RDWR | O_CREAT | O_TRUNC, true);
    1.30          VersionDictionary *hf;
    1.31          {
    1.32              Timer t("Creating & writing VersionDictionary", nWords);
    1.33 @@ -152,7 +152,7 @@
    1.34      }
    1.35      {
    1.36          printf("Opening OverlayVersionDictionary...\n");
    1.37 -        File file("/tmp/hashfiletest", O_RDWR);
    1.38 +        File file("/tmp/hashfiletest", O_RDWR, true);
    1.39          OverlayVersionDictionary hf(&file);
    1.40          EXPECT_EQ( nWords ,  hf.count() );
    1.41          EXPECT_TRUE(hf.get("abatement").equals("abatement"));
    1.42 @@ -225,7 +225,7 @@
    1.43          File oldFile("/tmp/hashfiletest");
    1.44          OverlayVersionDictionary oldhf(&oldFile);
    1.45          
    1.46 -        File newFile("/tmp/hashfiletest2", O_RDWR | O_CREAT | O_TRUNC);
    1.47 +        File newFile("/tmp/hashfiletest2", O_RDWR | O_CREAT | O_TRUNC, true);
    1.48          newFile.write("Ha5h", 4);     // VersionDictionary won't write to an empty file
    1.49          oldhf.saveAs(&newFile);
    1.50          printf("File size: %llu bytes\n", newFile.length());