We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59bb561 commit c5ea1d4Copy full SHA for c5ea1d4
tests/test-pgsql.cpp
@@ -135,3 +135,13 @@ TEST_CASE("create table and insert something")
135
REQUIRE(result.num_tuples() == 0);
136
REQUIRE(result.affected_rows() == 2);
137
}
138
+
139
+TEST_CASE("empty result object should return fatal status")
140
+{
141
+ pg_result_t result;
142
+ REQUIRE(result.status() == PGRES_FATAL_ERROR);
143
+ REQUIRE_FALSE(result);
144
+ REQUIRE(result.num_fields() == 0);
145
+ REQUIRE(result.num_tuples() == 0);
146
+ REQUIRE(result.affected_rows() == 0);
147
+}
0 commit comments