diff options
Diffstat (limited to '')
-rw-r--r-- | src/unit/file.cpp | 8 | ||||
-rw-r--r-- | src/unit/taf.cpp | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/unit/file.cpp b/src/unit/file.cpp index a22239d..cc19fac 100644 --- a/src/unit/file.cpp +++ b/src/unit/file.cpp | |||
@@ -31,7 +31,7 @@ public: | |||
31 | // | 31 | // |
32 | void writeFull() | 32 | void writeFull() |
33 | { | 33 | { |
34 | Bu::File sf("testfile1", "wb"); | 34 | Bu::File sf("testfile1", Bu::File::Write ); |
35 | for( int c = 0; c < 256; c++ ) | 35 | for( int c = 0; c < 256; c++ ) |
36 | { | 36 | { |
37 | unsigned char ch = (unsigned char)c; | 37 | unsigned char ch = (unsigned char)c; |
@@ -49,7 +49,7 @@ public: | |||
49 | 49 | ||
50 | void readBlocks() | 50 | void readBlocks() |
51 | { | 51 | { |
52 | Bu::File sf("testfile1", "rb"); | 52 | Bu::File sf("testfile1", Bu::File::Read ); |
53 | unsigned char buf[50]; | 53 | unsigned char buf[50]; |
54 | size_t total = 0; | 54 | size_t total = 0; |
55 | for(;;) | 55 | for(;;) |
@@ -74,7 +74,7 @@ public: | |||
74 | { | 74 | { |
75 | try | 75 | try |
76 | { | 76 | { |
77 | Bu::File sf("doesn'texist", "rb"); | 77 | Bu::File sf("doesn'texist", Bu::File::Read ); |
78 | unitFailed("No exception thrown"); | 78 | unitFailed("No exception thrown"); |
79 | } | 79 | } |
80 | catch( Bu::FileException &e ) | 80 | catch( Bu::FileException &e ) |
@@ -85,7 +85,7 @@ public: | |||
85 | 85 | ||
86 | void readError2() | 86 | void readError2() |
87 | { | 87 | { |
88 | Bu::File sf("testfile1", "rb"); | 88 | Bu::File sf("testfile1", Bu::File::Read ); |
89 | char buf[256]; | 89 | char buf[256]; |
90 | int r = sf.read( buf, 256 ); | 90 | int r = sf.read( buf, 256 ); |
91 | unitTest( r == 256 ); | 91 | unitTest( r == 256 ); |
diff --git a/src/unit/taf.cpp b/src/unit/taf.cpp index 4e22ab1..0a97eba 100644 --- a/src/unit/taf.cpp +++ b/src/unit/taf.cpp | |||
@@ -29,14 +29,14 @@ public: | |||
29 | { | 29 | { |
30 | #define FN_TMP ("/tmp/tmpXXXXXXXX") | 30 | #define FN_TMP ("/tmp/tmpXXXXXXXX") |
31 | Bu::FString sFnTmp(FN_TMP); | 31 | Bu::FString sFnTmp(FN_TMP); |
32 | Bu::File fOut = Bu::File::tempFile( sFnTmp, "wb" ); | 32 | Bu::File fOut = Bu::File::tempFile( sFnTmp, Bu::File::Write ); |
33 | const char *data = | 33 | const char *data = |
34 | "{test: name=\"Bob\"}" | 34 | "{test: name=\"Bob\"}" |
35 | ; | 35 | ; |
36 | fOut.write(data,strlen(data)); | 36 | fOut.write(data,strlen(data)); |
37 | fOut.close(); | 37 | fOut.close(); |
38 | 38 | ||
39 | Bu::File fIn(sFnTmp.getStr(), "rb"); | 39 | Bu::File fIn(sFnTmp.getStr(), Bu::File::Read ); |
40 | Bu::TafReader tr(fIn); | 40 | Bu::TafReader tr(fIn); |
41 | 41 | ||
42 | Bu::TafGroup *tn = tr.readGroup(); | 42 | Bu::TafGroup *tn = tr.readGroup(); |