History log of /haiku/src/tests/system/kernel/fs/KPathTest.cpp
Revision Date Author Comments
# e8a484b0 31-Jan-2020 Kyle Ambroff-Kao <kyle@ambroffkao.com>

tests/kernel: Fix KPath tests

42e3c6f97 changed the default buffer size for KPath, but the tests
still assume the original default.

Change-Id: I2712d81bbdc678bbaae11e975b0a9a05f5a9151f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2175
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# 655aae6a 30-Apr-2017 Axel Dörfler <axeld@pinc-software.de>

KPathTest: Fix build for GCC 5.

* Also fixed a warning in KPath.
* Sorry, again!


# e9843da3 30-Apr-2017 Axel Dörfler <axeld@pinc-software.de>

KPath: Added LAZY_ALLOC flag.

* This allows KPath to not allocate a buffer when initialized
without path.
* Added test cases for this.
* Added test for LockBuffer().
* Enhanced tests to allow building them in debug mode.
* Moved calling vfs_normalize_path() into own private method.
* Improved error codes; B_NO_MEMORY is now only returned if the
allocation actually failed.
* If used with LAZY_ALLOC, Path() and LockBuffer() are now allowed
to return a NULL path.


# f94671c3 30-Apr-2017 Axel Dörfler <axeld@pinc-software.de>

KPath.Adopt(): Fixed path length.

* Issue was hidden due to inappropriate test values; changed test
to uncover it.


# e1b4aed0 30-Apr-2017 Axel Dörfler <axeld@pinc-software.de>

KPath: Fixed Normalize() return code, changed Leaf().

* Normalize() now returns the error code that vfs_normalize_path()
returns.
* Leaf() now returns "" instead of "/" for the root. It's not used
outside of KPath.
* Adapted RemoveLeaf() to deal with this correctly.
* "KPath = string" no longer changes the buffer size.
* Added missing operator tests for =, ==, and !=.


# afd07b56 29-Apr-2017 Axel Dörfler <axeld@pinc-software.de>

KPathTest: Fixed build with gcc 5.


# 663b8004 29-Apr-2017 Axel Dörfler <axeld@pinc-software.de>

Added unit tests for KPath.

* There are a few oddities, and at least one bug.