sim,tests: Add unit test for sim/serialize.hh

Add a unit test for sim/serialize.hh.

arrayParamIn cannot parse strings with spaces. Since spaces
are used as delimiters, strings containing spaces are parsed
as multiple entries of the array. The test that checks for
this has been disabled.

==Unexpected Behavior==
Serialization has an unexpected behavior when returning to
previous scopes. For example,

  SCS scs(cpt, "S1")
  paramOut(cpt, "param1", integer1)
    SCS scs_2(cpt, "S2")
    paramOut(cpt, "param2", integer2)
  paramOut(cpt, "param3", integer3)

will generate the output:

But the user might expect:

==Incovenient Behavior==
arrayParamIn with a std::array parameter is slightly
incovenient, since the raw data pointer must be extracted.
It may be worth it to add a template specialization.

==Not Tested==
paramInImpl is not being directly tested because it should
not be used as an external API - paramIn and optParamIn
should be used instead.

arrayParamIn with an InsertIterator parameter is not being
directly tested because the other versions should be used

Change-Id: If0c8f045aa317790d5fcb32e48629b113b62efc5
Signed-off-by: Daniel R. Carvalho <>
Reviewed-by: Bobby R. Bruce <>
Maintainer: Bobby R. Bruce <>
Tested-by: kokoro <>
4 files changed