From bd6f0d2ff9f7a10bd282a1bc5437e4575627ad95 Mon Sep 17 00:00:00 2001 From: vro Date: Mon, 4 Jun 2018 10:47:18 +0300 Subject: [PATCH] 0029116: [Regression] OCAF attributes insertion order is violated again --- src/QABugs/QABugs_19.cxx | 4 ++-- src/TDF/TDF_Label.hxx | 2 +- tests/caf/basic/B8 | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/QABugs/QABugs_19.cxx b/src/QABugs/QABugs_19.cxx index 2926e7adde..273b1594cc 100644 --- a/src/QABugs/QABugs_19.cxx +++ b/src/QABugs/QABugs_19.cxx @@ -1935,10 +1935,10 @@ static Standard_Integer OCC24755 (Draw_Interpretor& di, Standard_Integer n, cons TDF_AttributeIterator i (aLab); Handle(TDF_Attribute) anAttr = i.Value(); - QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Name)), Standard_True); + QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Integer)), Standard_True); i.Next(); anAttr = i.Value(); - QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Integer)), Standard_True); + QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Name)), Standard_True); i.Next(); anAttr = i.Value(); QCOMPARE (anAttr->IsKind (STANDARD_TYPE (TDataStd_Real)), Standard_True); diff --git a/src/TDF/TDF_Label.hxx b/src/TDF/TDF_Label.hxx index 00f7522c88..ab01f019f9 100644 --- a/src/TDF/TDF_Label.hxx +++ b/src/TDF/TDF_Label.hxx @@ -117,7 +117,7 @@ public: //! Adds an Attribute to the current label. Raises if //! there is already one. - Standard_EXPORT void AddAttribute (const Handle(TDF_Attribute)& anAttribute, const Standard_Boolean append = Standard_False) const; + Standard_EXPORT void AddAttribute (const Handle(TDF_Attribute)& anAttribute, const Standard_Boolean append = Standard_True) const; //! Forgets an Attribute from the current label, //! setting its forgotten status true and its valid diff --git a/tests/caf/basic/B8 b/tests/caf/basic/B8 index bcd23d371b..8fecfd6b5f 100644 --- a/tests/caf/basic/B8 +++ b/tests/caf/basic/B8 @@ -19,10 +19,10 @@ CheckLabel D 0:1 set res1 [CheckLabel D 0:1] set indexReal1 [lsearch ${res1} TDataStd_Real] set indexInt1 [lsearch ${res1} TDataStd_Integer] -if { ${indexReal1} != 5} { +if { ${indexReal1} != 11} { puts "Error: Wrong position 1 of TDataStd_Real attribute." } -if { ${indexInt1} != 11} { +if { ${indexInt1} != 5} { puts "Error: Wrong position 1 of TDataStd_Integer attribute." }