Mercurial > hg > orthanc
comparison OrthancFramework/UnitTestsSources/JobsTests.cpp @ 4779:4f368230f32b
fix for msvc2008
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Aug 2021 11:51:56 +0200 |
parents | add0337b928a |
children | 0a38000b086d |
comparison
equal
deleted
inserted
replaced
4778:50fd70169f6e | 4779:4f368230f32b |
---|---|
1583 int32_t i; | 1583 int32_t i; |
1584 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "")); | 1584 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "")); |
1585 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "ee")); | 1585 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "ee")); |
1586 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "42")); ASSERT_EQ(42, i); | 1586 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "42")); ASSERT_EQ(42, i); |
1587 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "-42")); ASSERT_EQ(-42, i); | 1587 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "-42")); ASSERT_EQ(-42, i); |
1588 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "-2147483648")); ASSERT_EQ(-2147483648, i); | 1588 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "-2147483648")); ASSERT_EQ(-2147483648l, i); |
1589 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "2147483647")); ASSERT_EQ(2147483647, i); | 1589 ASSERT_TRUE(SerializationToolbox::ParseInteger32(i, "2147483647")); ASSERT_EQ(2147483647l, i); |
1590 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "-2147483649")); | 1590 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "-2147483649")); |
1591 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "2147483648")); | 1591 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "2147483648")); |
1592 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "-2\\-3\\-4")); | 1592 ASSERT_FALSE(SerializationToolbox::ParseInteger32(i, "-2\\-3\\-4")); |
1593 ASSERT_TRUE(SerializationToolbox::ParseFirstInteger32(i, "-2\\-3\\-4")); ASSERT_EQ(-2, i); | 1593 ASSERT_TRUE(SerializationToolbox::ParseFirstInteger32(i, "-2\\-3\\-4")); ASSERT_EQ(-2, i); |
1594 } | 1594 } |
1621 uint64_t i; | 1621 uint64_t i; |
1622 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "")); | 1622 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "")); |
1623 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "ee")); | 1623 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "ee")); |
1624 ASSERT_TRUE(SerializationToolbox::ParseUnsignedInteger64(i, "42")); ASSERT_EQ(42u, i); | 1624 ASSERT_TRUE(SerializationToolbox::ParseUnsignedInteger64(i, "42")); ASSERT_EQ(42u, i); |
1625 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "-42")); | 1625 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "-42")); |
1626 ASSERT_TRUE(SerializationToolbox::ParseUnsignedInteger64(i, "4294967296")); ASSERT_EQ(4294967296llu, i); | 1626 ASSERT_TRUE(SerializationToolbox::ParseUnsignedInteger64(i, "4294967296")); ASSERT_EQ(4294967296lu, i); |
1627 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "2\\3\\4")); | 1627 ASSERT_FALSE(SerializationToolbox::ParseUnsignedInteger64(i, "2\\3\\4")); |
1628 ASSERT_TRUE(SerializationToolbox::ParseFirstUnsignedInteger64(i, "2\\3\\4")); ASSERT_EQ(2u, i); | 1628 ASSERT_TRUE(SerializationToolbox::ParseFirstUnsignedInteger64(i, "2\\3\\4")); ASSERT_EQ(2u, i); |
1629 } | 1629 } |
1630 | 1630 |
1631 { | 1631 { |