Browse Source

ext lib_test - add test for function returning struct containing array of structs

master
heck 4 years ago
parent
commit
2bca875db4
  1. 13
      examples/ext/lib_test/tests/test_lib_test.py

13
examples/ext/lib_test/tests/test_lib_test.py

@ -302,8 +302,17 @@ def test_struct_field_array_of_char_get_set():
# // CS - Complex Structs containing array
# // CS contains a PS[3] (which is an array of structs)
# // By value
# TACS func_TACS_args_V(); // MISSING
#
def test_func_TACS_args_V():
(ret,) = func_TACS_args_V()
assert(ret.field__PS_1.field__P_1 == 23);
assert(ret.field__PS_1.field__P_2 == 23);
assert(ret.field_APS_1[0].field__P_1 == 23);
assert(ret.field_APS_1[0].field__P_2 == 24);
assert(ret.field_APS_1[1].field__P_1 == 25);
assert(ret.field_APS_1[1].field__P_2 == 26);
assert(ret.field_APS_1[2].field__P_1 == 27);
assert(ret.field_APS_1[2].field__P_2 == 28);
# TACS func_TACS_args_TACS(TACS arg1_TACS); // MISSING
#
# // By pointer

Loading…
Cancel
Save