50
#Test 9
Test Name
Register
new objects in
obj_array[ ]
Test Description
src\wakaama-client.cpp
file holds a definition for
init()
function that
performs the task of registering all the objects in
obj_array[ ].
The
newly added objects by the code generator should also be registered at
the appropriate index in the array.
Input
temperature.xml
IPSO Object file
Expected
Outcome
In
ArduinoClient::init()
function, the following lines of code
are added:
SerialUSB.println(F("*object:temperature"));
objArray[4] = get_object_temperature();
if (nullptr == objArray[4])
{
SerialUSB.println(objFail);
exit(0);
}
The whole
wakaama-client.cpp
file is erased
after successful code
generation
Pass/Fail
Fail
Comments
NA
Table 3.2.1.8 Register new objects in
obj_array[ ]
test
#Test 9
Test Name
Free objects in
~ArduinoClient()
destructor
Test Description
src\wakaama-client.cpp
file holds a definition for destructor
~ArduinoClient( )
, which holds the calls to functions that free
the
objects from
obj_array[ ]
Input
temperature.xml
IPSO Object file
Expected Outcome
The line
free_object_temperature(objArray[4]);
is added
in
~ArduinoClient( )
's definition
Actual Outcome
The whole
wakaama-client.cpp
file is erased after successful code
generation
Pass/Fail
Fail
Comments
NA
Table 3.2.1.9 Free objects in
~ArduinoClient()
destructor test
51
#Test 10
Test Name
Generation of resource table in comments
at the start of each
object_objectname.cpp
file
Test Description
All default
object_objectname.cpp
files have a table in comments at
the beginning of the file that describes the details related to the
object. For example, they may contain the object ID, resources in the
object,
resource IDs, Operations, Instances,
Mandatory, Type,
Range, Unit etc
Input
temperature.xml
IPSO Object file
Expected Outcome
A detailed table describing the properties of object and the resources
within the object is printed at the beginning in the comments
Actual Outcome
Table
not printed
Pass/Fail
Fail
Comments
NA
Table 3.2.1.10 Generation of resource table test
3.2.2
Summary
For quick overview, the pass/fail status of each test has been tabulated below:
#
Test
Pass/Fail
1
Generation of
object_objectname.cpp
files
in correct folder
Partially pass
2
Selection and removal of IPSO XML file(s)
Partially pass
3
Generation of .cpp files
Pass
4
Generation of
object_objectname.cpp
files in correct folder
Pass
5
Syntactically correct generation of
object_objectname.cpp
source file
Pass
6
Update OBJ_COUNT global
variable
Fail
7
Update
extern "C" {..}
linkage specification
Do'stlaringiz bilan baham: