9 #ifndef _STRVALUE_TEST_H_
25 #include <cxxtest/TestSuite.h>
42 TS_ASSERT( strValue.
setFrom( testStr ) );
43 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"Hello!", 6 );
46 TS_ASSERT( strValue.
setFrom( testUChar ) );
47 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"1 enum", 6 );
50 TS_ASSERT( strValue.
setFrom( testInt ) );
51 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"2 enum", 6 );
54 TS_ASSERT( strValue.
setFrom( testFloat2 ) );
55 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"3.4375", 6 );
58 TS_ASSERT( strValue.
setFrom( testFloat3 ) );
59 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"4.5", 3 );
62 TS_ASSERT( strValue.
setFrom( testFloat ) );
63 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"5.625", 5 );
66 TS_ASSERT( strValue.
setFrom( testDouble4 ) );
67 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"6.75", 4 );
70 TS_ASSERT( strValue.
setFrom( testDouble6 ) );
71 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"7.875", 5 );
74 TS_ASSERT( strValue.
setFrom( testDouble ) );
75 TS_ASSERT_SAME_DATA( strValue.
asString().
cStr(),
"8.9375", 6 );
81 #endif // _STRVALUE_TEST_H
Contains the Double4 class definition.
Contains the Double6 class definition.
Wraps a double precision (8-byte) floating point number and unit for storage in a DataElement...
Definition: Double.h:36
Wraps a single precision (4-byte) floating point number and unit for storage in a DataElement...
Definition: Float3.h:37
Wraps a 32-bit (4-byte) signed integer and unit for storage in a DataElement.
Definition: Int.h:32
Unit tests for StrValue class.
Definition: StrValue_Test.h:32
Contains the Float class definition.
void testSetFrom(void)
tests the setFrom Method
Definition: StrValue_Test.h:37
Wraps a 32-bit (4-byte) signed integer and unit for storage in a DataElement.
Definition: UChar.h:33
Wraps a single precision (4-byte) floating point number and unit for storage in a DataElement...
Definition: Float2.h:37
Contains the StrValue class definition.
Wraps a double precision (8-byte) floating point number and unit for storage in a DataElement...
Definition: Double6.h:36
virtual const Str & asString() const
Definition: StrValue.cpp:129
Contains the Int class definition.
const char * cStr() const
Definition: Str.h:188
Contains the Units class declaration.
Contains the UChar class definition.
static const BaseUnit ENUM
Definition: Units.h:229
Contains the Float3 class definition.
virtual bool setFrom(const Unit &unit, unsigned char value)
set from unsigned char value
Definition: StrValue.h:160
Wraps a double precision (8-byte) floating point number and unit for storage in a DataElement...
Definition: Double4.h:33
Wraps a string (see Str) as a DataValue, so strings can be written to and read from the slate...
Definition: StrValue.h:34
Contains the Double class definition.
Wraps a single precision (4-byte) floating point number and unit for storage in a DataElement...
Definition: Float.h:36
static const BaseUnit METER
Definition: Units.h:42
Contains the Float2 class definition.