Update of /cvsroot/ccmtools/ccmtools/test/IDLParser/constants
In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv449/test/IDLParser/constants
Added Files:
Makefile ConstantExpression.idl ConstantGlobal.idl
Log Message:
Refactored test directory
--- NEW FILE: ConstantGlobal.idl ---
#ifndef __CONSTANT_GLOBAL__IDL__
#define __CONSTANT_GLOBAL__IDL__
#include <enum/Color.idl>
const short SHORT_CONST = -3;
const long LONG_CONST = -7777;
const long long LONG_LONG_CONST = 7777777;
const unsigned short USHORT_CONST = 7;
const unsigned long ULONG_CONST = 7777;
const unsigned long long ULLONG_CONST = 7777777;
const float FLOAT_CONST = 3.14;
const double DOUBLE_CONST = 3.1415926;
const long double LDOUBLE_CONST = 3.1415926;
const char CHAR_CONST = 'c';
const wchar WCHAR_CONST = L'c';
const string STRING_CONST = "1234567890";
const string<5> BSTRING_CONST = "12345";
const wstring WSTRING_CONST = L"1234567890";
const wstring<5> BWSTRING_CONST = L"12345";
const boolean BOOLEAN_CONST = TRUE;
const octet OCTET_CONST = 255;
const Color ENUM_CONST = red;
#endif // __CONSTANT_GLOBAL__IDL__
--- NEW FILE: Makefile ---
INCLUDE= -I../
all: idl3
idl3:
ccmparser ${INCLUDE} ConstantGlobal.idl
ccmparser ConstantExpression.idl
--- NEW FILE: ConstantExpression.idl ---
#ifndef __CONSTANT_EXPRESSION__IDL__
#define __CONSTANT_EXPRESSION__IDL__
/**
* Arithmetic Operations
*/
const long LONG_ADD_CONST = 7 + 3;
const long LONG_SUB_CONST = 3 - 7;
const long LONG_MUL_CONST = 7 * 3;
const long LONG_DIV_CONST = 7 / 3;
const long LONG_MOD_CONST = 7 % 3;
const long LONG_RESULT = (LONG_ADD_CONST + LONG_SUB_CONST) * LONG_MUL_CONST / LONG_DIV_CONST;
const double DOUBLE_ADD_CONST = 7.71 + 3.32;
const double DOUBLE_SUB_CONST = 7.71 - 3.32;
const double DOUBLE_MUL_CONST = 7.71 * 3.32;
const double DOUBLE_DIV_CONST = 7.71 / 3.32;
const double DOUBLE_RESULT = (DOUBLE_ADD_CONST + DOUBLE_SUB_CONST) * DOUBLE_MUL_CONST / DOUBLE_DIV_CONST;
#endif // __CONSTANT_EXPRESSION__IDL__
|