2 Copyright 2020 Google LLC
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file or at
6 https://developers.google.com/open-source/licenses/bsd
9 #ifndef TEST_FRAMEWORK_H
10 #define TEST_FRAMEWORK_H
13 #include "reftable-error.h"
15 #define EXPECT_ERR(c) \
20 fprintf(stderr, "%s: %d: error == %d (%s), want 0\n", \
21 __FILE__, __LINE__, c, reftable_error_str(c)); \
26 #define EXPECT_STREQ(a, b) \
31 fprintf(stderr, "%s:%d: %s (%s) != %s (%s)\n", __FILE__, \
32 __LINE__, #a, a, #b, b); \
42 fprintf(stderr, "%s: %d: failed assertion %s\n", __FILE__, \
49 fprintf(stderr, "running %s\n", #f); \
53 void set_test_hash(uint8_t *p
, int i
);
55 /* Like strbuf_add, but suitable for passing to reftable_new_writer
57 ssize_t
strbuf_add_void(void *b
, const void *data
, size_t sz
);
59 int noop_flush(void *);