Add a test helper for simple JSON serialisation testing
While adding yet another JSON serialisation test, I realised that this can be trivially abstracted; hence this patch, replacing both simple versions (readJSON . showJSON == id) and the standard version (with different error messages) across the tests with a single function call. Signed-off-by:Iustin Pop <iustin@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
Showing
- htest/Test/Ganeti/HTools/Types.hs 5 additions, 21 deletionshtest/Test/Ganeti/HTools/Types.hs
- htest/Test/Ganeti/Jobs.hs 2 additions, 10 deletionshtest/Test/Ganeti/Jobs.hs
- htest/Test/Ganeti/Objects.hs 2 additions, 5 deletionshtest/Test/Ganeti/Objects.hs
- htest/Test/Ganeti/OpCodes.hs 1 addition, 4 deletionshtest/Test/Ganeti/OpCodes.hs
- htest/Test/Ganeti/Query/Language.hs 2 additions, 5 deletionshtest/Test/Ganeti/Query/Language.hs
- htest/Test/Ganeti/TestCommon.hs 8 additions, 0 deletionshtest/Test/Ganeti/TestCommon.hs
Loading
Please register or sign in to comment