NCBI C++ ToolKit
Macros | Functions | Variables
tables.c File Reference
#include "common.h"
#include <freetds/test_assert.h>
+ Include dependency graph for tables.c:

Go to the source code of this file.

Go to the SVN repository for this file.

Macros

#define NAME_TEST
 
#define LEN(x)   (x) ? (SQLSMALLINT) strlen(x) : SQL_NULL_DATA
 
#define DoTest(a, b)   DoTest(a,b,__LINE__)
 

Functions

static void ReadCol (int i)
 
static void TestName (int index, const char *expected_name)
 
static void DoTest (const char *type, int row_returned, int line)
 
int main (int argc, char *argv[])
 

Variables

static SQLINTEGER cnamesize
 
static char output [256]
 
static const char * catalog = NULL
 
static const char * schema = NULL
 
static const char * table = "sysobjects"
 
static const char * expect = NULL
 
static int expect_col = 3
 
static char expected_type [20] = "SYSTEM TABLE"
 

Macro Definition Documentation

◆ DoTest

#define DoTest (   a,
  b 
)    DoTest(a,b,__LINE__)

Definition at line 127 of file tables.c.

◆ LEN

#define LEN (   x)    (x) ? (SQLSMALLINT) strlen(x) : SQL_NULL_DATA

◆ NAME_TEST

#define NAME_TEST
Value:
do { \
if (strcmp(C(name), expected_name) != 0) \
{ \
sprintf(buf, "wrong name in column %d expected '%s' got '%s'", index, expected_name, C(name)); \
ODBC_REPORT_ERROR(buf); \
} \
} while(0)
#define C(s)
Definition: common.h:231
char * buf
int strcmp(const char *str1, const char *str2)
Definition: odbc_utils.hpp:160

Function Documentation

◆ DoTest()

static void DoTest ( const char *  type,
int  row_returned,
int  line 
)
static

◆ main()

int main ( int  argc,
char *  argv[] 
)

◆ ReadCol()

static void ReadCol ( int  i)
static

Definition at line 14 of file tables.c.

References CHKGetData, cnamesize, i, output, and SQL_C_CHAR.

Referenced by DoTest().

◆ TestName()

static void TestName ( int  index,
const char *  expected_name 
)
static

Variable Documentation

◆ catalog

const char* catalog = NULL
static

Definition at line 48 of file tables.c.

Referenced by DoTest(), and main().

◆ cnamesize

SQLINTEGER cnamesize
static

Definition at line 10 of file tables.c.

Referenced by ReadCol().

◆ expect

const char* expect = NULL
static

Definition at line 51 of file tables.c.

Referenced by DoTest(), and main().

◆ expect_col

int expect_col = 3
static

Definition at line 52 of file tables.c.

Referenced by DoTest(), and main().

◆ expected_type

char expected_type[20] = "SYSTEM TABLE"
static

Definition at line 53 of file tables.c.

Referenced by DoTest(), and main().

◆ output

char output[256]
static

Definition at line 11 of file tables.c.

Referenced by DoTest(), and ReadCol().

◆ schema

const char* schema = NULL
static

Definition at line 49 of file tables.c.

Referenced by DoTest(), and main().

◆ table

const char* table = "sysobjects"
static

Definition at line 50 of file tables.c.

Referenced by DoTest(), and main().

Modified on Sun May 19 04:43:49 2024 by modify_doxy.py rev. 669887