aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2024-10-01 11:21:13 -0700
committerMike Buland <mike@xagasoft.com>2024-10-01 11:21:13 -0700
commit00651aeaf50f8481a2c894f9462cd3b8eb6971d6 (patch)
tree72630f5c1918e8188b92e6f93f0122dbea8022d1 /src/tests
parent373b8f42902686ea1181b1edd8c2c06555cad8fd (diff)
downloadlibbu++-00651aeaf50f8481a2c894f9462cd3b8eb6971d6.tar.gz
libbu++-00651aeaf50f8481a2c894f9462cd3b8eb6971d6.tar.bz2
libbu++-00651aeaf50f8481a2c894f9462cd3b8eb6971d6.tar.xz
libbu++-00651aeaf50f8481a2c894f9462cd3b8eb6971d6.zip
More myriad fixes, it passes all existing unit tests.
Diffstat (limited to '')
-rw-r--r--src/tests/myriad.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/myriad.cpp b/src/tests/myriad.cpp
new file mode 100644
index 0000000..ee4eac4
--- /dev/null
+++ b/src/tests/myriad.cpp
@@ -0,0 +1,23 @@
1#include <bu/myriad.h>
2#include <bu/myriadstream.h>
3#include <bu/string.h>
4#include <bu/sio.h>
5#include <bu/file.h>
6
7int main( int , char *[] )
8{
9 Bu::File fMyriad("test.myr", Bu::File::WriteNew|Bu::File::Read );
10 Bu::Myriad m( fMyriad, 32 );
11
12 Bu::MyriadStream ms = m.create( Bu::Myriad::ReadWrite );
13 ms.setSize( 150 );
14 ms.setPos( 145 );
15 char stuff[10];
16 int32_t iRead = ms.read( stuff, 10 );
17
18 Bu::println("Tried to read 10, expect 5, got %1").arg( iRead );
19
20
21 return 0;
22}
23