History log of /haiku/src/tests/kits/storage/StorageKitTestAddon.cpp
Revision Date Author Comments
# f0a016dc 21-Sep-2023 Augustin Cavalier <waddlesplash@gmail.com>

BBufferedDataIO: Fix Write().

I looked at this code as a reference when writing similar code in another
project, and realized then that this was broken to the point where I
don't think anyone could have actually used it:

1. Writes larger than the buffer should only return the amount written
by this Write() call, not the amount flushed beforehand.

2. fDirty was only set if there were bytes remaining after the first
write to the buffer. So, if you wrote small amounts of data, they
would be silently discarded most of the time!

3. When filling the buffer, we might as well flush simultaneously.
This allows the logic to be consolidated into a loop and remove the
duplicate memcpy. In case of failure, just return the bytes-written
as the write could be retried later.

4. Flush() should always return an error or 0, not bytes written.

While at it, add some basic tests for this class.

Change-Id: I2de01d0b31e3fe22863cef21dd7b0b62ed47121b


# df8b692a 14-Aug-2018 Kacper Kasper <kacperkasper@gmail.com>

Revive unit tests

* Fix build on 64-bit.
* Test suite can now run from start to finish.
* Changes in OutlineListView test need an explanation:
for some reason when BApplication is created on heap, be_app is not
reset. This causes other tests to crash due to second BApplication
object being created.

Change-Id: Ic7d55f4622192f83572bfd83fa37f1f5fd641e22
Reviewed-on: https://review.haiku-os.org/465
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 0256e7a4 10-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Disable the MIME type test.

* This tests requires some private APIs which have been changed, it
needs to be rewritten.
* I'm also not sure if it's still possible to work on a copy of the MIME
* database to avoid messing with the system one.


# 467cfff6 03-Dec-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BVolume tests.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1bafb18 25-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BNodeInfo and BAppFileInfo tests to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2129049b 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Accounted for ParserTest -> MimeSnifferTest name change


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@609 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef831f36 27-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated to include MIME Sniffer Parser tests


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aad997bd 17-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Finished migrating Storage Kit tests to new framework.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@292 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1f6c38f 17-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Unit testing update:
- Verbosity is now honored globally
- Added BTestCase::Outputf()
- Migrated BNode, BStatable, BDirectory, and BPath tests
- Added CommonTestLib, TestLib, and R5TestLib rules to Jamrules
- Updated Jamfiles for unit testing stuff
- Probably a few other things I've forgotten


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@269 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0256e7a458a84de206700fcfef9aa8410ed8642a 10-Jun-2014 Adrien Destugues <pulkomandy@pulkomandy.tk>

Disable the MIME type test.

* This tests requires some private APIs which have been changed, it
needs to be rewritten.
* I'm also not sure if it's still possible to work on a copy of the MIME
* database to avoid messing with the system one.


# 467cfff600df5949fbe853ce076d00ab12052623 03-Dec-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BVolume tests.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2145 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1bafb18f22cf66b1df6b1452ba48ff4456dab24 25-Aug-2002 Ingo Weinhold <ingo_weinhold@gmx.de>

Added BNodeInfo and BAppFileInfo tests to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@885 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2129049b1341cf85f094e24e15a472a38b3abc8b 06-Aug-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Accounted for ParserTest -> MimeSnifferTest name change


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@609 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ef831f3638321f19a51d525fefe0bc4807b0e20e 27-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Updated to include MIME Sniffer Parser tests


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@478 a95241bf-73f2-0310-859d-f6bbb57e9c96


# aad997bd6c9035ac0185bda5c52bd1ba2dd8a47d 17-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Finished migrating Storage Kit tests to new framework.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@292 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1f6c38f0d8029fda3c77d45dde4c9fa53e2e75b 17-Jul-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Unit testing update:
- Verbosity is now honored globally
- Added BTestCase::Outputf()
- Migrated BNode, BStatable, BDirectory, and BPath tests
- Added CommonTestLib, TestLib, and R5TestLib rules to Jamrules
- Updated Jamfiles for unit testing stuff
- Probably a few other things I've forgotten


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@269 a95241bf-73f2-0310-859d-f6bbb57e9c96