GridLab
Grid Application Toolkit

A simple API for Grid Applications
GAT

Menu



Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members  

GATTable_tests.c File Reference

Source file for the GATTable_tests class. More...

#include <string.h>
#include "GAT.h"
#include "GATString.h"
#include "GATMemoryStream.h"
#include "GATTestUtils.h"

Include dependency graph for GATTable_tests.c:

Include dependency graph

Go to the source code of this file.

Defines

#define _countof(x)   (sizeof(x)/sizeof(x[0]))

Functions

void test_GATTable_Entries (GATTable_const table)
void test_GATTable_Cloning (GATTable_const table)
void test_GATTable_Serialising (GATContext context, GATTable table)
void test_positives (GATTable_const table)
void test_entry_types (GATTable_const table)
void test_negatives_short (GATTable_const table)
void test_negatives_int (GATTable_const table)
void test_negatives_float (GATTable_const table)
void test_negatives_double (GATTable_const table)
void test_negatives_string (GATTable_const table)
void test_negatives_object (GATTable_const table)
void test_remove_short (GATTable_const table)
void test_remove_int (GATTable_const table)
void test_remove_float (GATTable_const table)
void test_remove_double (GATTable_const table)
void test_remove_string (GATTable_const table)
void test_remove_object (GATTable_const table)
void test_remove_unknown (GATTable_const table)
GATTable fill_GATTable (void)
int main (void)

Variables

const char * rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/test/internal/GATTable_tests.c,v 1.16 2004/04/20 17:04:43 hartmutkaiser Exp $"
char const * key_values []
GATTable fill_GATTable (void)


Detailed Description

Source file for the GATTable_tests class.

Date:
Sun Nov 2 2003
Version:
Header:
/export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/test/internal/GATTable_tests.c,v 1.16 2004/04/20 17:04:43 hartmutkaiser Exp

Copyright (C) Hartmut Kaiser This file is part of the GAT Engine. Contributed by Hartmut Kaiser <hartmutkaiser [at] t-online [dot] de>.

Use, modification and distribution is subject to the Gridlab Software License. (See accompanying file GLlicense.txt or copy at http://www.gridlab.org/GLlicense.txt)

Definition in file GATTable_tests.c.


Define Documentation

#define _countof      (sizeof(x)/sizeof(x[0]))
 

Definition at line 36 of file GATTable_tests.c.

Referenced by fill_GATTable().


Function Documentation

void test_GATTable_Entries GATTable_const    table [static]
 

Definition at line 733 of file GATTable_tests.c.

References GATTable_const, test_entry_types(), test_negatives_double(), test_negatives_float(), test_negatives_int(), test_negatives_object(), test_negatives_short(), test_negatives_string(), test_positives(), test_remove_double(), test_remove_float(), test_remove_int(), test_remove_object(), test_remove_short(), test_remove_string(), and test_remove_unknown().

Referenced by main().

void test_GATTable_Cloning GATTable_const    table [static]
 

Definition at line 756 of file GATTable_tests.c.

References GAT_FAIL, GAT_SUCCEEDED, GAT_TEST, GATBool, GATFalse, GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Equals(), GATTable_Remove(), and GATTrue.

Referenced by main().

void test_GATTable_Serialising GATContext    context,
GATTable    table
[static]
 

Definition at line 778 of file GATTable_tests.c.

References GAT_FAIL, GAT_SUCCEEDED, GAT_TEST, GATBool, GATFalse, GATMemoryStream, GATMemoryStream_Create(), GATMemoryStream_Destroy(), GATMemoryStream_Seek(), GATObject_Destroy(), GATObject_GetType(), GATOrigin_Set, GATSerialisable_DeSerialise(), GATSerialisable_Serialise(), GATTable_DeSerialise(), GATTable_Destroy(), GATTable_Equals(), GATTable_Serialise(), GATTrue, and GATType_GATTable.

Referenced by main().

void test_positives GATTable_const    table [static]
 

Definition at line 64 of file GATTable_tests.c.

References GAT_FAIL, GAT_SUCCEEDED, GAT_TEST, GAT_TEST_START, GAT_TEST_STOP, GATObject_GetType(), GATString_GetBuffer(), GATTable_const, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), and GATType_GATString.

Referenced by test_GATTable_Entries().

void test_entry_types GATTable_const    table [static]
 

Definition at line 103 of file GATTable_tests.c.

References GAT_TEST, GAT_TEST_START, GAT_TEST_STOP, GATTable_const, GATTable_Get_ElementType(), GATType, GATType_GATdouble64, GATType_GATfloat32, GATType_GATint16, GATType_GATint32, GATType_GATObject, GATType_NoType, and GATType_String.

Referenced by test_GATTable_Entries().

void test_negatives_short GATTable_const    table [static]
 

Definition at line 135 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_KEY_TYPE_ERROR, GAT_TEST, GATTable_const, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), and GATTable_Get_String().

Referenced by test_GATTable_Entries().

void test_negatives_int GATTable_const    table [static]
 

Definition at line 166 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_KEY_TYPE_ERROR, GAT_TEST, GATTable_const, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), and GATTable_Get_String().

Referenced by test_GATTable_Entries().

void test_negatives_float GATTable_const    table [static]
 

Definition at line 197 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_KEY_TYPE_ERROR, GAT_TEST, GATTable_const, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), and GATTable_Get_String().

Referenced by test_GATTable_Entries().

void test_negatives_double GATTable_const    table [static]
 

Definition at line 228 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_KEY_TYPE_ERROR, GAT_TEST, GATTable_const, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), and GATTable_Get_String().

Referenced by test_GATTable_Entries().

void test_negatives_string GATTable_const    table [static]
 

Definition at line 259 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_KEY_TYPE_ERROR, GAT_TEST, GATTable_const, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), and GATTable_Get_String().

Referenced by test_GATTable_Entries().

void test_negatives_object GATTable_const    table [static]
 

Definition at line 290 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_KEY_TYPE_ERROR, GAT_TEST, GATTable_const, GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), and GATTable_Get_String().

Referenced by test_GATTable_Entries().

void test_remove_short GATTable_const    table [static]
 

Definition at line 395 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_SUCCEEDED, GAT_TEST, GATObject_GetType(), GATString_GetBuffer(), GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), GATTable_Remove(), and GATType_GATString.

Referenced by test_GATTable_Entries().

void test_remove_int GATTable_const    table [static]
 

Definition at line 444 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_SUCCEEDED, GAT_TEST, GATObject_GetType(), GATString_GetBuffer(), GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), GATTable_Remove(), and GATType_GATString.

Referenced by test_GATTable_Entries().

void test_remove_float GATTable_const    table [static]
 

Definition at line 493 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_SUCCEEDED, GAT_TEST, GATObject_GetType(), GATString_GetBuffer(), GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), GATTable_Remove(), and GATType_GATString.

Referenced by test_GATTable_Entries().

void test_remove_double GATTable_const    table [static]
 

Definition at line 542 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_SUCCEEDED, GAT_TEST, GATObject_GetType(), GATString_GetBuffer(), GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), GATTable_Remove(), and GATType_GATString.

Referenced by test_GATTable_Entries().

void test_remove_string GATTable_const    table [static]
 

Definition at line 591 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_SUCCEEDED, GAT_TEST, GATObject_GetType(), GATString_GetBuffer(), GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), GATTable_Remove(), and GATType_GATString.

Referenced by test_GATTable_Entries().

void test_remove_object GATTable_const    table [static]
 

Definition at line 639 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_SUCCEEDED, GAT_TEST, GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), and GATTable_Remove().

Referenced by test_GATTable_Entries().

void test_remove_unknown GATTable_const    table [static]
 

Definition at line 683 of file GATTable_tests.c.

References GAT_FAIL, GAT_KEY_NOT_FOUND, GAT_SUCCEEDED, GAT_TEST, GATObject_GetType(), GATString_GetBuffer(), GATTable_Clone(), GATTable_const, GATTable_Destroy(), GATTable_Get_double(), GATTable_Get_float(), GATTable_Get_GATObject(), GATTable_Get_int(), GATTable_Get_short(), GATTable_Get_String(), GATTable_Remove(), and GATType_GATString.

Referenced by test_GATTable_Entries().

GATTable fill_GATTable void    [static]
 

Definition at line 321 of file GATTable_tests.c.

References _countof, GAT_FAIL, GAT_KEY_ALREADY_EXISTS, GAT_SUCCEEDED, GAT_TEST, GATString_Create(), GATString_Destroy(), GATTable_Add_double(), GATTable_Add_float(), GATTable_Add_GATObject(), GATTable_Add_int(), GATTable_Add_short(), GATTable_Add_String(), GATTable_Create(), GATTable_GetKeys(), GATTable_Size(), GATuint32, and key_values.

Referenced by main().

int main void   
 

Definition at line 837 of file GATTable_tests.c.

References fill_GATTable(), GAT_TEST, GAT_TEST_FINISH, GAT_TEST_INIT, GAT_TEST_SUITE, GAT_TEST_TRACE, GATContext_Create(), GATContext_Destroy(), GATContext_GetType(), GATTable_Destroy(), GATType_GATContext, test_GATTable_Cloning(), test_GATTable_Entries(), and test_GATTable_Serialising().


Variable Documentation

const char* rcsid = "$Header: /export/cvs-gridlab/wp-1/Codes/GATEngine/C-reference/test/internal/GATTable_tests.c,v 1.16 2004/04/20 17:04:43 hartmutkaiser Exp $" [static]
 

Definition at line 17 of file GATTable_tests.c.

char const* key_values[] [static]
 

Initial value:

 {
  "short value", 
  "int value", 
  "float value", 
  "double value", 
  "string value", 
  "object value"
}

Definition at line 27 of file GATTable_tests.c.

Referenced by fill_GATTable().

GATTable fill_GATTable(void) [static]
 

Definition at line 321 of file GATTable_tests.c.