Code

data: Use a predefined format for sdb_strftime().
[sysdb.git] / t / unit / core / data_test.c
index 1955528e919a8c753b1c1c99842a15296890b716..27daaae149a1bf48dbc7b2b9e0a50a87ae4a4dff 100644 (file)
@@ -32,7 +32,6 @@
 #include "core/data.h"
 #include "testutils.h"
 
-#include <assert.h>
 #include <check.h>
 
 static regex_t empty_re;
@@ -171,7 +170,7 @@ START_TEST(test_data)
        check = sdb_data_parse(".", SDB_TYPE_REGEX, &d2);
        fail_unless(check == 0,
                        "INTERNAL ERROR: Failed to parse regex '.'");
-       assert(d2.type == SDB_TYPE_REGEX);
+       ck_assert(d2.type == SDB_TYPE_REGEX);
        check = sdb_data_copy(&d1, &d2);
        fail_unless(!check, "sdb_data_copy() = %i; expected: 0", check);
        fail_unless(d1.type == d2.type,
@@ -2351,7 +2350,7 @@ START_TEST(test_format)
                },
                {
                        { SDB_TYPE_DATETIME, { .datetime= 471147114711471100 } },
-                       "\"1984-12-06 02:11:54 +0000\"",
+                       "\"1984-12-06 02:11:54.711471100 +0000\"",
                },
                {
                        { SDB_TYPE_BINARY, { .binary = { 0, NULL } } },