aboutsummaryrefslogtreecommitdiff
path: root/src/unit
diff options
context:
space:
mode:
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
11public: 11public:
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 );