1#pragma once
2
3#ifdef _MSC_VER
4// these break enum.hpp otherwise
5#undef DELETE
6#undef DEFAULT
7#undef EXISTS
8#undef IN
9// this breaks file_system.cpp otherwise
10#undef CreateDirectory
11#undef RemoveDirectory
12#endif
13
14#include "compare_result.hpp"
15#include "duckdb.hpp"
16#include "duckdb/common/string_util.hpp"
17#include "duckdb/common/types.hpp"
18
19namespace duckdb {
20
21void DeleteDatabase(string path);
22void TestDeleteDirectory(string path);
23void TestCreateDirectory(string path);
24void TestDeleteFile(string path);
25string TestCreatePath(string suffix);
26unique_ptr<DBConfig> GetTestConfig();
27
28string GetCSVPath();
29void WriteCSV(string path, const char *csv);
30void WriteBinary(string path, const uint8_t *data, uint64_t length);
31
32bool NO_FAIL(QueryResult &result);
33bool NO_FAIL(unique_ptr<QueryResult> result);
34
35#define REQUIRE_NO_FAIL(result) REQUIRE(NO_FAIL((result)))
36#define REQUIRE_FAIL(result) REQUIRE(!(result)->success)
37
38#define COMPARE_CSV(result, csv, header) \
39 { \
40 auto res = compare_csv(*result, csv, header); \
41 if (!res.empty()) \
42 FAIL(res); \
43 }
44
45} // namespace duckdb
46