greenplumn assertions 源码

2022-08-18 浏览 (471)

greenplumn assertions 代码

文件路径:/src/test/modules/test_planner/src/assertions.h

#include "postgres.h"
#include "utils/elog.h"

char* int_to_bool_string(int value);
char* int_to_int_string(int value);

void test_succeeded(
	const char *test_function_name,
	const char *test_file_name,
	int test_line_number);

void test_failed(
	char *expected,
	char *actual,
	const char *test_function_name,
	const char *test_file_name,
	int test_line_number);

#define assert_that_bool(actual, expected) \
	if (expected == actual) { \
		test_succeeded(__func__, __FILE__, __LINE__); \
	} else { \
		test_failed(int_to_bool_string(expected), int_to_bool_string(actual), __func__, __FILE__, __LINE__); \
	}

#define assert_that_int(actual, expected) \
	if (expected == actual) { \
		test_succeeded(__func__, __FILE__, __LINE__); \
	} else { \
		test_failed(int_to_int_string(expected), int_to_int_string(actual), __func__, __FILE__, __LINE__); \
	}

#define is_equal_to(expected) (expected)

相关信息

greenplumn 源码目录

相关文章

greenplumn assertions 源码

greenplumn planner_test_helpers 源码

greenplumn planner_test_helpers 源码

  • 所属分类: 大数据
  • 本文标签: greenplum
  • 版权声明: 本文链接 https://seaxiang.com/blog/20a4fc15f9984481a88d838478165ad1