mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
AK: Remove the LexicalPath::is_valid() API
Since this is always set to true on the non-default constructor and subsequently never modified, it is somewhat pointless. Furthermore, there are arguably no invalid relative paths.
This commit is contained in:
parent
caa9daf59e
commit
9b8f35259c
Notes:
sideshowbarker
2024-07-18 11:13:43 +09:00
Author: https://github.com/MaxWipfli
Commit: 9b8f35259c
Pull-request: https://github.com/SerenityOS/serenity/pull/8320
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
10 changed files with 14 additions and 66 deletions
|
|
@ -9,15 +9,9 @@
|
|||
#include <AK/LexicalPath.h>
|
||||
#include <AK/String.h>
|
||||
|
||||
TEST_CASE(construct)
|
||||
{
|
||||
EXPECT_EQ(LexicalPath().is_valid(), false);
|
||||
}
|
||||
|
||||
TEST_CASE(basic)
|
||||
{
|
||||
LexicalPath path("/abc/def/ghi.txt");
|
||||
EXPECT_EQ(path.is_valid(), true);
|
||||
EXPECT_EQ(path.basename(), "ghi.txt");
|
||||
EXPECT_EQ(path.title(), "ghi");
|
||||
EXPECT_EQ(path.extension(), "txt");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue