Skip to content
  • Iustin Pop's avatar
    Add a complex allocation/serialisation/load test · dce9bbb3
    Iustin Pop authored
    
    
    This is unfortunately a complex test that checks if:
    
    - starting from a empty cluster
    - allocating a few instances on it
    - serialising it via the Text backend
    - loading it back into internal data structures
    
    we end up with the same thing. More precisely, it checks that the
    cluster after dump/load is the same as after allocation.
    
    While this is in the Text unittests, as the docstring saying, this
    check more stuff than just the dump/load. It increases the overall
    coverage by about 3%.
    
    There were a few changes needed for this unittest: adding some Eq
    instances for some data types, and fixing a cosmetic bug in
    Cluster.iterateAlloc, where the instance indices were growing by 2
    instead of by 1 in each round.
    
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
    dce9bbb3