mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
BLOB: Add default-constructed read tests
This commit is contained in:
@@ -254,6 +254,16 @@ TEST_CASE("PostgreSQL blob", "[postgresql][blob]")
|
||||
// in PostgreSQL, BLOB operations must be within transaction block
|
||||
transaction tr(sql);
|
||||
|
||||
{
|
||||
// Read from default-constructed BLOB
|
||||
blob b(sql);
|
||||
|
||||
CHECK(b.get_len() == 0);
|
||||
|
||||
char buf2[5];
|
||||
std::size_t read = b.read_from_start(buf2, 5);
|
||||
CHECK(read == 0);
|
||||
}
|
||||
{
|
||||
// empty, default-constructed BLOB
|
||||
blob b(sql);
|
||||
|
||||
Reference in New Issue
Block a user