Use a utility function to compare json document and expected string
Signed-off-by: srikappa <srikappa@amazon.com>
This commit is contained in:
@@ -71,10 +71,7 @@ namespace JsonSerializationTests
|
||||
const AZ::JsonApplyPatchSettings& settings = AZ::JsonApplyPatchSettings{})
|
||||
{
|
||||
CheckApplyPatchOutcome(target, patch, outcome, processing, settings);
|
||||
rapidjson::Document expectedPatchedDocument;
|
||||
expectedPatchedDocument.Parse(expectedPatchedResult);
|
||||
ASSERT_FALSE(expectedPatchedDocument.HasParseError());
|
||||
EXPECT_EQ(AZ::JsonSerialization::Compare(expectedPatchedDocument, *m_jsonDocument), AZ::JsonSerializerCompareResult::Equal);
|
||||
Expect_DocStrEq(expectedPatchedResult);
|
||||
}
|
||||
|
||||
void CheckCreatePatch_Core(const char* source, AZStd::string_view patch, const char* target,
|
||||
|
||||
@@ -265,8 +265,8 @@ namespace AzToolsFramework
|
||||
|
||||
AZ_Error(
|
||||
"Prefab",
|
||||
result.GetOutcome() != AZ::JsonSerializationResult::Outcomes::PartialSkip &&
|
||||
result.GetOutcome() != AZ::JsonSerializationResult::Outcomes::Success,
|
||||
result.GetOutcome() == AZ::JsonSerializationResult::Outcomes::PartialSkip ||
|
||||
result.GetOutcome() == AZ::JsonSerializationResult::Outcomes::Success,
|
||||
"Some of the patches are not successfully applied.");
|
||||
|
||||
//remove the link id placed into the instance
|
||||
|
||||
Reference in New Issue
Block a user