index c1071fb584e0f18b333eb18607c1193f374a4fc1..826d938fc4444a5d02a0bde60812dcb83ebc0933 100644 (file)
--- a/t/unit/core/store_test.c
+++ b/t/unit/core/store_test.c
"sdb_store_get_field(<host>, SDB_FIELD_INTERVAL, <value>) "
"returned value {%d, %lu}; expected {%d, 10}",
value.type, value.data.datetime, SDB_TYPE_DATETIME);
+
+ check = sdb_store_get_field(host, SDB_FIELD_BACKEND, &value);
+ fail_unless(check == 0,
+ "sdb_store_get_field(<host>, SDB_FIELD_BACKEND, <value>) = "
+ "%d; expected: 0");
+ /* there are no backends in this test */
+ fail_unless((value.type == (SDB_TYPE_ARRAY | SDB_TYPE_STRING))
+ && (value.data.array.length == 0)
+ && (value.data.array.values == NULL),
+ "sdb_store_get_field(<host>, SDB_FIELD_BACKEND, <value>) "
+ "returned value {%d, %lu, %p}; expected {%d, 0, NULL}",
+ value.type, value.data.array.length, value.data.array.values,
+ SDB_TYPE_ARRAY | SDB_TYPE_STRING);
}
END_TEST