From 995b6e46b5e00cdb3f234bf26d88dcae50afb0ed Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 17 Aug 2017 01:17:20 +0100 Subject: Add [json] test cases for local class operations --- slicer/test/initial/localClass.json | 1 + slicer/test/initial/localSub2Class.json | 1 + slicer/test/initial/localSubClass.json | 1 + slicer/test/serializers.cpp | 16 ++++++++++++++++ 4 files changed, 19 insertions(+) create mode 100644 slicer/test/initial/localClass.json create mode 100644 slicer/test/initial/localSub2Class.json create mode 100644 slicer/test/initial/localSubClass.json diff --git a/slicer/test/initial/localClass.json b/slicer/test/initial/localClass.json new file mode 100644 index 0000000..161b83d --- /dev/null +++ b/slicer/test/initial/localClass.json @@ -0,0 +1 @@ +{"a":1,"b":"Two"} diff --git a/slicer/test/initial/localSub2Class.json b/slicer/test/initial/localSub2Class.json new file mode 100644 index 0000000..2f4a5f1 --- /dev/null +++ b/slicer/test/initial/localSub2Class.json @@ -0,0 +1 @@ +{"a":1,"b":"Two","c":3.1,"d":4,"slicer-typeid":"::Locals::LocalSub2Class"} diff --git a/slicer/test/initial/localSubClass.json b/slicer/test/initial/localSubClass.json new file mode 100644 index 0000000..4af0ae5 --- /dev/null +++ b/slicer/test/initial/localSubClass.json @@ -0,0 +1 @@ +{"a":1,"b":"Two","c":3.1} diff --git a/slicer/test/serializers.cpp b/slicer/test/serializers.cpp index f9ee4c1..1fbceb8 100644 --- a/slicer/test/serializers.cpp +++ b/slicer/test/serializers.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include "helpers.h" #include @@ -487,6 +488,21 @@ BOOST_AUTO_TEST_CASE( json_objectmapMember ) verifyByFile("objectmapMember.json", checkObjectMapMember); } +BOOST_AUTO_TEST_CASE( json_localClass ) +{ + verifyByFile("localClass.json"); +} + +BOOST_AUTO_TEST_CASE( json_localSub2Class ) +{ + verifyByFile("localSub2Class.json"); +} + +BOOST_AUTO_TEST_CASE( json_localSubClass ) +{ + verifyByFile("localSub2Class.json"); +} + BOOST_AUTO_TEST_CASE( json_simpleArray ) { verifyByFile("simpleArray1.json"); -- cgit v1.2.3