mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
LibSQL: Remove Core::EventReceiver parent from SQL::Heap
This relationship was only used to provide a name and factory methods for the heap.
This commit is contained in:
parent
2c17742811
commit
4a04438e43
Notes:
sideshowbarker
2024-07-17 03:03:15 +09:00
Author: https://github.com/trflynn89
Commit: 4a04438e43
Pull-request: https://github.com/SerenityOS/serenity/pull/20411
Reviewed-by: https://github.com/gmta ✅
7 changed files with 29 additions and 21 deletions
|
|
@ -100,28 +100,28 @@ static void insert_and_verify(int count)
|
|||
TEST_CASE(create_heap)
|
||||
{
|
||||
ScopeGuard guard([]() { unlink("/tmp/test.db"); });
|
||||
auto heap = SQL::Heap::construct("/tmp/test.db");
|
||||
auto heap = MUST(SQL::Heap::create("/tmp/test.db"));
|
||||
TRY_OR_FAIL(heap->open());
|
||||
EXPECT_EQ(heap->version(), SQL::Heap::VERSION);
|
||||
}
|
||||
|
||||
TEST_CASE(create_from_dev_random)
|
||||
{
|
||||
auto heap = SQL::Heap::construct("/dev/random");
|
||||
auto heap = MUST(SQL::Heap::create("/dev/random"));
|
||||
auto should_be_error = heap->open();
|
||||
EXPECT(should_be_error.is_error());
|
||||
}
|
||||
|
||||
TEST_CASE(create_from_unreadable_file)
|
||||
{
|
||||
auto heap = SQL::Heap::construct("/etc/shadow");
|
||||
auto heap = MUST(SQL::Heap::create("/etc/shadow"));
|
||||
auto should_be_error = heap->open();
|
||||
EXPECT(should_be_error.is_error());
|
||||
}
|
||||
|
||||
TEST_CASE(create_in_non_existing_dir)
|
||||
{
|
||||
auto heap = SQL::Heap::construct("/tmp/bogus/test.db");
|
||||
auto heap = MUST(SQL::Heap::create("/tmp/bogus/test.db"));
|
||||
auto should_be_error = heap->open();
|
||||
EXPECT(should_be_error.is_error());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue