Git commit bca3b0b024842bf175dbc416c241f1025a706380 by Andreas Hartmetz. Committed on 04/12/2016 at 18:40. Pushed by ahartmetz into branch 'master'. Fix some tests that were accidentally made ineffective. They were apparently not ported when Arguments::Writer::finish() was changed to *return* the produced Arguments instance, so doRoundtrip() was called on empty Arguments, which trivially succeeded. Fortunately, those tests still pass otherwise unchanged. M +6 -8 tests/serialization/tst_arguments.cpp https://commits.kde.org/dferry/bca3b0b024842bf175dbc416c241f1025a706380 diff --git a/tests/serialization/tst_arguments.cpp b/tests/serialization/ts= t_arguments.cpp index 340ab09..0ff8bc0 100644 --- a/tests/serialization/tst_arguments.cpp +++ b/tests/serialization/tst_arguments.cpp @@ -1119,7 +1119,7 @@ static void test_complicated() writer.writeDouble(1.982342); writer.endArray(); TEST(writer.state() !=3D Arguments::InvalidData); - writer.finish(); + arg =3D writer.finish(); TEST(writer.state() !=3D Arguments::InvalidData); } doRoundtrip(arg); @@ -1127,7 +1127,6 @@ static void test_complicated() = static void test_alignment() { - Arguments arg; { Arguments::Writer writer; writer.writeByte(123); @@ -1139,7 +1138,7 @@ static void test_alignment() } = TEST(writer.state() !=3D Arguments::InvalidData); - writer.finish(); + Arguments arg =3D writer.finish(); TEST(writer.state() !=3D Arguments::InvalidData); doRoundtrip(arg); } @@ -1150,14 +1149,13 @@ static void test_alignment() writer.writeByte(110); writer.endStruct(); writer.writeByte(200); - writer.finish(); + Arguments arg =3D writer.finish(); doRoundtrip(arg); } } = static void test_arrayOfVariant() { - Arguments arg; // non-empty array { Arguments::Writer writer; @@ -1170,7 +1168,7 @@ static void test_arrayOfVariant() writer.writeByte(123); = TEST(writer.state() !=3D Arguments::InvalidData); - writer.finish(); + Arguments arg =3D writer.finish(); TEST(writer.state() !=3D Arguments::InvalidData); doRoundtrip(arg); } @@ -1185,7 +1183,7 @@ static void test_arrayOfVariant() writer.writeByte(123); = TEST(writer.state() !=3D Arguments::InvalidData); - writer.finish(); + Arguments arg =3D writer.finish(); TEST(writer.state() !=3D Arguments::InvalidData); doRoundtrip(arg); } @@ -1221,7 +1219,7 @@ static void test_realMessage() writer.writeInt64(46137372); = TEST(writer.state() !=3D Arguments::InvalidData); - writer.finish(); + arg =3D writer.finish(); TEST(writer.state() !=3D Arguments::InvalidData); } doRoundtrip(arg);