From 00651aeaf50f8481a2c894f9462cd3b8eb6971d6 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 1 Oct 2024 11:21:13 -0700 Subject: More myriad fixes, it passes all existing unit tests. --- src/tests/myriad.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/tests/myriad.cpp (limited to 'src/tests') 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 @@ +#include +#include +#include +#include +#include + +int main( int , char *[] ) +{ + Bu::File fMyriad("test.myr", Bu::File::WriteNew|Bu::File::Read ); + Bu::Myriad m( fMyriad, 32 ); + + Bu::MyriadStream ms = m.create( Bu::Myriad::ReadWrite ); + ms.setSize( 150 ); + ms.setPos( 145 ); + char stuff[10]; + int32_t iRead = ms.read( stuff, 10 ); + + Bu::println("Tried to read 10, expect 5, got %1").arg( iRead ); + + + return 0; +} + -- cgit v1.2.3