From cfbc564bb6b9c7f2fd97040efb5d6865dbb7b6c7 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Mon, 26 Apr 2004 23:05:36 +0000 Subject: [PATCH] Add a check for the toInt() stuff. git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@306691 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- tests/toolkit-test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/toolkit-test.cpp b/tests/toolkit-test.cpp index 06843249..e5a8d62e 100644 --- a/tests/toolkit-test.cpp +++ b/tests/toolkit-test.cpp @@ -152,6 +152,16 @@ void testByteVector() testConversion(0x000000a0, 0x00, 0x00, 0x00, 0xa0); testConversion(0xd50bf072, 0xd5, 0x0b, 0xf0, 0x72); + ByteVector intVector(2, 0); + intVector[0] = char(0xfc); + intVector[1] = char(0x00); + printResult(intVector.toUInt() == 64512); + printResult(intVector.toInt() == -1024); + intVector[0] = char(0x04); + intVector[1] = char(0x00); + printResult(intVector.toUInt() == 1024); + printResult(intVector.toInt() == 1024); + ByteVector r0("**************"); ByteVector r1("OggS**********"); ByteVector r2("**********OggS");