diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-04-10 20:16:19 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-04-10 20:16:19 +0000 |
commit | 070374dde0f53bff26078550997f7682e84412e5 (patch) | |
tree | d9088b02e9b5f08f25d7f07f3a26035eea00e8e9 /src/unit | |
parent | e7ab7cb1604c04763bbdcece5885e6ce5aa100b4 (diff) | |
download | libbu++-070374dde0f53bff26078550997f7682e84412e5.tar.gz libbu++-070374dde0f53bff26078550997f7682e84412e5.tar.bz2 libbu++-070374dde0f53bff26078550997f7682e84412e5.tar.xz libbu++-070374dde0f53bff26078550997f7682e84412e5.zip |
I did it, the streams don't start with an S now.
Diffstat (limited to 'src/unit')
-rw-r--r-- | src/unit/file.cpp (renamed from src/unit/sfile.cpp) | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/unit/sfile.cpp b/src/unit/file.cpp index 2aff312..a45b8d7 100644 --- a/src/unit/sfile.cpp +++ b/src/unit/file.cpp | |||
@@ -1,5 +1,5 @@ | |||
1 | #include "unitsuite.h" | 1 | #include "unitsuite.h" |
2 | #include "sfile.h" | 2 | #include "file.h" |
3 | #include "exceptions.h" | 3 | #include "exceptions.h" |
4 | 4 | ||
5 | #include <sys/types.h> | 5 | #include <sys/types.h> |
@@ -11,7 +11,7 @@ class Unit : public Bu::UnitSuite | |||
11 | public: | 11 | public: |
12 | Unit() | 12 | Unit() |
13 | { | 13 | { |
14 | setName("SFile"); | 14 | setName("File"); |
15 | addTest( Unit::writeFull ); | 15 | addTest( Unit::writeFull ); |
16 | addTest( Unit::readBlocks ); | 16 | addTest( Unit::readBlocks ); |
17 | addTest( Unit::readError1 ); | 17 | addTest( Unit::readError1 ); |
@@ -25,7 +25,7 @@ public: | |||
25 | // | 25 | // |
26 | void writeFull() | 26 | void writeFull() |
27 | { | 27 | { |
28 | Bu::SFile sf("testfile1", "wb"); | 28 | Bu::File sf("testfile1", "wb"); |
29 | for( int c = 0; c < 256; c++ ) | 29 | for( int c = 0; c < 256; c++ ) |
30 | { | 30 | { |
31 | unsigned char ch = (unsigned char)c; | 31 | unsigned char ch = (unsigned char)c; |
@@ -43,7 +43,7 @@ public: | |||
43 | 43 | ||
44 | void readBlocks() | 44 | void readBlocks() |
45 | { | 45 | { |
46 | Bu::SFile sf("testfile1", "rb"); | 46 | Bu::File sf("testfile1", "rb"); |
47 | unsigned char buf[50]; | 47 | unsigned char buf[50]; |
48 | size_t total = 0; | 48 | size_t total = 0; |
49 | for(;;) | 49 | for(;;) |
@@ -68,7 +68,7 @@ public: | |||
68 | { | 68 | { |
69 | try | 69 | try |
70 | { | 70 | { |
71 | Bu::SFile sf("doesn'texist", "rb"); | 71 | Bu::File sf("doesn'texist", "rb"); |
72 | unitFailed("No exception thrown"); | 72 | unitFailed("No exception thrown"); |
73 | } | 73 | } |
74 | catch( Bu::FileException &e ) | 74 | catch( Bu::FileException &e ) |
@@ -79,7 +79,7 @@ public: | |||
79 | 79 | ||
80 | void readError2() | 80 | void readError2() |
81 | { | 81 | { |
82 | Bu::SFile sf("testfile1", "rb"); | 82 | Bu::File sf("testfile1", "rb"); |
83 | char buf[256]; | 83 | char buf[256]; |
84 | int r = sf.read( buf, 256 ); | 84 | int r = sf.read( buf, 256 ); |
85 | unitTest( r == 256 ); | 85 | unitTest( r == 256 ); |