Skip to content

Commit

Permalink
Disable broken JSON tests
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul committed Sep 20, 2023
1 parent 93544c2 commit 96b2c72
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 9 deletions.
5 changes: 4 additions & 1 deletion wpiutil/src/test/native/cpp/json/unit-cbor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1699,5 +1699,8 @@ static const internal::CborRoundtripTestParam rfc7049_appendix_a_objects[] = {
{"{\"Fun\": true, \"Amt\": -2}", {0xbf,0x63,0x46,0x75,0x6e,0xf5,0x63,0x41,0x6d,0x74,0x21,0xff}, false},
};

INSTANTIATE_TEST_SUITE_P(CborRfc7049AppendixAObjectTests, CborRoundtripTest,
// Disabled because serialization order isn't guaranteed by the underlying map
// container
INSTANTIATE_TEST_SUITE_P(DISABLED_CborRfc7049AppendixAObjectTests,
CborRoundtripTest,
::testing::ValuesIn(rfc7049_appendix_a_objects));
4 changes: 3 additions & 1 deletion wpiutil/src/test/native/cpp/json/unit-comparison.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ TEST_F(JsonComparisonValuesTest, NotEqual)
EXPECT_EQ(nullptr != j_null, !(nullptr == j_null));
}

TEST_F(JsonComparisonValuesTest, Less)
// Disabled because serialization order isn't guaranteed by the underlying map
// container
TEST_F(JsonComparisonValuesTest, DISABLED_Less)
{
static const std::vector<std::vector<bool>> expected =
{
Expand Down
8 changes: 6 additions & 2 deletions wpiutil/src/test/native/cpp/json/unit-element_access2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,14 +568,18 @@ TEST_F(JsonElementObjectRemoveTest, Key)
}

// erase(begin())
TEST_F(JsonElementObjectRemoveTest, Begin)
// Disabled because iteration order isn't guaranteed by the underlying map
// container
TEST_F(JsonElementObjectRemoveTest, DISABLED_Begin)
{
json jobject = {{"a", "a"}, {"b", 1}, {"c", 17u}};
jobject.erase(jobject.begin());
EXPECT_EQ(jobject, json({{"b", 1}, {"c", 17u}}));
}

TEST_F(JsonElementObjectRemoveTest, BeginConst)
// Disabled because iteration order isn't guaranteed by the underlying map
// container
TEST_F(JsonElementObjectRemoveTest, DISABLED_BeginConst)
{
json jobject = {{"a", "a"}, {"b", 1}, {"c", 17u}};
jobject.erase(jobject.cbegin());
Expand Down
20 changes: 15 additions & 5 deletions wpiutil/src/test/native/cpp/json/unit-iterators1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,9 @@ class JsonIteratorObjectTest : public ::testing::Test {
json j_const;
};

TEST_F(JsonIteratorObjectTest, BeginEnd)
// Disabled because iteration order isn't guaranteed by the underlying map
// container
TEST_F(JsonIteratorObjectTest, DISABLED_BeginEnd)
{
json::iterator it_begin = j.begin();
json::iterator it_end = j.end();
Expand All @@ -686,7 +688,9 @@ TEST_F(JsonIteratorObjectTest, BeginEnd)
EXPECT_EQ(it, it_end);
}

TEST_F(JsonIteratorObjectTest, ConstBeginEnd)
// Disabled because iteration order isn't guaranteed by the underlying map
// container
TEST_F(JsonIteratorObjectTest, DISABLED_ConstBeginEnd)
{
json::const_iterator it_begin = j_const.begin();
json::const_iterator it_end = j_const.end();
Expand All @@ -710,7 +714,9 @@ TEST_F(JsonIteratorObjectTest, ConstBeginEnd)
EXPECT_EQ(it, it_end);
}

TEST_F(JsonIteratorObjectTest, CBeginEnd)
// Disabled because iteration order isn't guaranteed by the underlying map
// container
TEST_F(JsonIteratorObjectTest, DISABLED_CBeginEnd)
{
json::const_iterator it_begin = j.cbegin();
json::const_iterator it_end = j.cend();
Expand All @@ -734,7 +740,9 @@ TEST_F(JsonIteratorObjectTest, CBeginEnd)
EXPECT_EQ(it, it_end);
}

TEST_F(JsonIteratorObjectTest, ConstCBeginEnd)
// Disabled because iteration order isn't guaranteed by the underlying map
// container
TEST_F(JsonIteratorObjectTest, DISABLED_ConstCBeginEnd)
{
json::const_iterator it_begin = j_const.cbegin();
json::const_iterator it_end = j_const.cend();
Expand Down Expand Up @@ -831,7 +839,9 @@ TEST_F(JsonIteratorObjectTest, ConstCRBeginEnd)
}
#endif

TEST_F(JsonIteratorObjectTest, KeyValue)
// Disabled because iteration order isn't guaranteed by the underlying map
// container
TEST_F(JsonIteratorObjectTest, DISABLED_KeyValue)
{
auto it = j.begin();
auto cit = j_const.cbegin();
Expand Down

0 comments on commit 96b2c72

Please sign in to comment.