Mercurial > hg > orthanc
comparison UnitTestsSources/MultiThreadingTests.cpp @ 2731:fe4fe52f0c94
fix warnings
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 13 Jul 2018 12:35:31 +0200 |
parents | cb1b26a7db98 |
children | dc7330089736 |
comparison
equal
deleted
inserted
replaced
2730:cb1b26a7db98 | 2731:fe4fe52f0c94 |
---|---|
940 { | 940 { |
941 std::auto_ptr<IJobOperation> operation; | 941 std::auto_ptr<IJobOperation> operation; |
942 operation.reset(unserializer.UnserializeOperation(s)); | 942 operation.reset(unserializer.UnserializeOperation(s)); |
943 | 943 |
944 // Make sure that we have indeed unserialized a log operation | 944 // Make sure that we have indeed unserialized a log operation |
945 ASSERT_THROW(dynamic_cast<DeleteResourceOperation&>(*operation), std::bad_cast); | 945 Json::Value dummy; |
946 dynamic_cast<LogJobOperation&>(*operation); | 946 ASSERT_THROW(dynamic_cast<DeleteResourceOperation&>(*operation).Serialize(dummy), std::bad_cast); |
947 dynamic_cast<LogJobOperation&>(*operation).Serialize(dummy); | |
947 } | 948 } |
948 } | 949 } |
949 | 950 |
950 | 951 |
951 TEST(JobsSerialization, GenericJobs) | 952 TEST(JobsSerialization, GenericJobs) |
1286 std::auto_ptr<IJobOperation> operation; | 1287 std::auto_ptr<IJobOperation> operation; |
1287 | 1288 |
1288 { | 1289 { |
1289 operation.reset(unserializer.UnserializeOperation(s)); | 1290 operation.reset(unserializer.UnserializeOperation(s)); |
1290 | 1291 |
1291 ASSERT_THROW(dynamic_cast<LogJobOperation&>(*operation), std::bad_cast); | 1292 Json::Value dummy; |
1292 dynamic_cast<DeleteResourceOperation&>(*operation); | 1293 ASSERT_THROW(dynamic_cast<LogJobOperation&>(*operation).Serialize(dummy), std::bad_cast); |
1294 dynamic_cast<DeleteResourceOperation&>(*operation).Serialize(dummy); | |
1293 } | 1295 } |
1294 | 1296 |
1295 // StorePeerOperation | 1297 // StorePeerOperation |
1296 | 1298 |
1297 { | 1299 { |