0030957: Data Exchange - Assembly item Id should not start with '/' symbol
authortma <tatiana.retinskaya@opencascade.com>
Mon, 9 Sep 2019 11:36:22 +0000 (14:36 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 11 Sep 2019 15:48:14 +0000 (18:48 +0300)
Fix test case: added parsing of the output of the dump note command

src/XCAFDoc/XCAFDoc_AssemblyItemId.cxx
tests/gdt/notes/B1

index 2998451..032ce30 100644 (file)
@@ -119,5 +119,6 @@ XCAFDoc_AssemblyItemId::ToString() const
     aStr += '/';
     aStr += anIt.Value();
   }
+  aStr.Remove(1, 1);
   return aStr;
 }
index c79c0ab..6b2d952 100644 (file)
@@ -4,7 +4,7 @@ set comment [XNoteCreateComment D "Hello, World!" --user "The user" --time [cloc
 XNoteDump D ${comment}
 
 # annotate box_1
-XNoteRefDump D [XNoteAdd D ${comment} ${box_1}]
+set assemblyItemId [XNoteRefDump D [XNoteAdd D ${comment} ${box_1}]]
 
 # annotate box_2
 XNoteRefDump D [XNoteAdd D ${comment} ${box_2}]
@@ -16,3 +16,10 @@ XNoteAnnotations D
 set nb_annotations_result 2
 set nb_notes_result 1
 set nb_orphan_result 0
+
+# check the assembly item id
+if {[regexp "Item      : ${box_1}" ${assemblyItemId}]} {
+       puts "OK : assembly item  id" 
+} else {
+       puts "Error : wrong assembly item id"
+}