diff --git a/src/XmlOcafResource/XmlOcaf.xsd b/src/XmlOcafResource/XmlOcaf.xsd index 35e26b7c97..d14576b90b 100755 --- a/src/XmlOcafResource/XmlOcaf.xsd +++ b/src/XmlOcafResource/XmlOcaf.xsd @@ -53,6 +53,7 @@ + diff --git a/src/XmlOcafResource/XmlOcaf_TDataStd.xsd b/src/XmlOcafResource/XmlOcaf_TDataStd.xsd index ce54ee07a2..0fa0e5b1ac 100755 --- a/src/XmlOcafResource/XmlOcaf_TDataStd.xsd +++ b/src/XmlOcafResource/XmlOcaf_TDataStd.xsd @@ -47,6 +47,7 @@ + @@ -58,6 +59,7 @@ + diff --git a/tests/xml/begin b/tests/xml/begin new file mode 100755 index 0000000000..a7757c0991 --- /dev/null +++ b/tests/xml/begin @@ -0,0 +1,74 @@ +pload TOPTEST +pload DCAF + +cpulimit 300 + +set ValidatorCheck 0 + +if { [info exists env(CSF_ValidatorPath)] != 0 } { + if {[file exists $env(CSF_ValidatorPath)]} { + set ValidatorCheck 1 + set Validator $env(CSF_ValidatorPath) + } +} + +if { [info exists imagedir] == 0 } { + set imagedir . +} + +if { [info exists test_image ] == 0 } { + set test_image photo +} + +set WorkDirectory $imagedir + +set os "ALL" +if {[array get env os_type] != ""} { + set os $env(os_type) +} + +if { [regexp "indows" $os ] == 1 } { + set env(CSF_TestDataPath) "$env(CSF_TestDataPath);$env(CASROOT)" + if {[regexp -nocase {jdk} $env(PATH)] || [regexp -nocase {java} $env(PATH)]} { + set Java "java" + } else { + puts "Warning: environment variable PATH doesn't contain path to Java" + } +} else { + catch {set Java $env(JAVAHOME)/bin/java} + set env(CSF_TestDataPath) "$env(CSF_TestDataPath):$env(CASROOT)" +} + +set SchemaFile "" + +proc SaveToFile { aD aFile } { + upvar $aD D + global FileSuffix ValidatorCheck + catch {[file delete ${aFile}]} + SaveAs D $aFile + if { [file exists $aFile] } { + if { $FileSuffix == "xml" && $ValidatorCheck} { + ValidateXml $aFile + } else { + puts "Validation of XML file by XSD schema is not provided." + } + } else { + puts "Error : There is no ${aFile} file" + } + catch {[file attributes ${aFile} -permissions 0777]} +} + +proc ValidateXml { aFile } { + global Validator Java SchemaFile + if { ![info exists Java] } { + puts "Error : Java is not exists" + return + } + set isValidInfo "" + set ValCommand "exec $Java -jar $Validator $SchemaFile ${aFile}" + set isValid [catch {set isValidInfo [eval $ValCommand]}] + puts $isValidInfo + if { ![regexp "the document is valid" ${isValidInfo}] } { + puts "Error : File is not valid" + } +} diff --git a/tests/xml/data/ocaf/A1 b/tests/xml/data/ocaf/A1 new file mode 100644 index 0000000000..acc7052438 --- /dev/null +++ b/tests/xml/data/ocaf/A1 @@ -0,0 +1,24 @@ +set aTestName "caf001-A3" + +# Add an attribute to a data framework +set aSetAttr1 100 +set aLabel 0:2 +SetInteger D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetAttr3 [GetInteger DD ${aLabel}]} aResult] +if { ${IsDone} != 0 || ${aSetAttr1}!=${aGetAttr3} } { + puts "Error : Get a value of TDataStd_Integer attribute from restoring document" +} diff --git a/tests/xml/data/ocaf/A2 b/tests/xml/data/ocaf/A2 new file mode 100644 index 0000000000..3cbdf38a04 --- /dev/null +++ b/tests/xml/data/ocaf/A2 @@ -0,0 +1,25 @@ +set aTestName "caf001-B3" +puts $aTestName + +# Add an attribute to a data framework +set aSetAttr1 100.0 +set aLabel 0:2 +SetReal D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetAttr3 [GetReal DD ${aLabel}]} aResult] +if { ${IsDone} != 0 || ${aSetAttr1}!=${aGetAttr3} } { + puts "Error : Get a value of TDataStd_Real attribute from restoring document" +} diff --git a/tests/xml/data/ocaf/A3 b/tests/xml/data/ocaf/A3 new file mode 100644 index 0000000000..21c36ee422 --- /dev/null +++ b/tests/xml/data/ocaf/A3 @@ -0,0 +1,45 @@ +set aTestName "caf001-C3" +puts $aTestName + +set QA_DUP 0 + +# Add an attribute to a data framework +set aFrom1 1 +set aTo1 2 +set aSetAttr11 3. +set aSetAttr12 4. +set aLabel 0:2 +set isDelta 0 +SetRealArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute + +set IsDone [catch {set aGetAttr3 [GetRealArray DD ${aLabel}]} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" +} else { + set aLen3 [llength ${aGetAttr3}] + if { ${aLen3} != [expr ${aTo1} - ${aFrom1} + 1] } { + puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" + } + set aGetAttr41 [lindex ${aGetAttr3} 0] + if { ${aSetAttr11} != ${aGetAttr41} } { + puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" + } + set aGetAttr42 [lindex ${aGetAttr3} 1] + if { ${aSetAttr12} != ${aGetAttr42} } { + puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" + } +} \ No newline at end of file diff --git a/tests/xml/data/ocaf/A4 b/tests/xml/data/ocaf/A4 new file mode 100644 index 0000000000..9452782678 --- /dev/null +++ b/tests/xml/data/ocaf/A4 @@ -0,0 +1,45 @@ +set aTestName "caf001-D3" +puts ${aTestName} + +set QA_DUP 0 + +# Add an attribute to a data framework +set aFrom1 1 +set aTo1 2 +set aSetAttr11 3 +set aSetAttr12 4 +set aLabel 0:2 +set isDelta 0 +SetIntArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute + +set IsDone [catch {set aGetAttr3 [GetIntArray DD ${aLabel}]} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" +} else { + set aLen3 [llength ${aGetAttr3}] + if { ${aLen3} != [expr ${aTo1} - ${aFrom1} + 1] } { + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" + } + set aGetAttr41 [lindex ${aGetAttr3} 0] + if { ${aSetAttr11} != ${aGetAttr41} } { + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" + } + set aGetAttr42 [lindex ${aGetAttr3} 1] + if { ${aSetAttr12} != ${aGetAttr42} } { + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/A5 b/tests/xml/data/ocaf/A5 new file mode 100644 index 0000000000..5bfc9ab4cf --- /dev/null +++ b/tests/xml/data/ocaf/A5 @@ -0,0 +1,26 @@ +set aTestName "caf001-E3" +puts ${aTestName} + +# Add an attribute to a data framework +set aSetAttr1 "New Attribute" +set aLabel 0:2 +Label D ${aLabel} +SetName D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetAttr3 [GetName DD ${aLabel}]} aResult] +if { ${IsDone} != 0 || ${aSetAttr1}!=${aGetAttr3} } { + puts "Error : Get a value of TDataStd_Name attribute from restoring document" +} diff --git a/tests/xml/data/ocaf/A6 b/tests/xml/data/ocaf/A6 new file mode 100644 index 0000000000..bdf3fe9370 --- /dev/null +++ b/tests/xml/data/ocaf/A6 @@ -0,0 +1,26 @@ +set aTestName "caf001-F3" +puts ${aTestName} + +# Add an attribute to a data framework +set aSetAttr1 "New Attribute" +set aLabel 0:2 +Label D ${aLabel} +SetComment D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetAttr3 [GetComment DD ${aLabel}]} aResult] +if { ${IsDone} != 0 || ${aSetAttr1}!=${aGetAttr3} } { + puts "Error : Get a value of TDataStd_Comment attribute from restoring document" +} diff --git a/tests/xml/data/ocaf/A7 b/tests/xml/data/ocaf/A7 new file mode 100644 index 0000000000..038c7634e5 --- /dev/null +++ b/tests/xml/data/ocaf/A7 @@ -0,0 +1,54 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "caf001-G3" +puts ${aTestName} + +set aTokList { :,} + +# Add an attribute to a data framework +set aSetX1 10 +set aSetY1 20 +set aSetZ1 30 +point aPoint1 ${aSetX1} ${aSetY1} ${aSetZ1} + +set aDumpPoint1 [dump aPoint1] + +regexp {Point : ([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpPoint1} full X_Point1 Y_Point1 Z_Point1 + +set aLabel 0:2 +SetPoint D ${aLabel} aPoint1 + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetAttr3 [GetPoint DD ${aLabel}]} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Point attribute from restoring document" +} else { + GetPoint DD ${aLabel} aPoint5 + + set aDumpPoint5 [dump aPoint5] + regexp {Point : ([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpPoint5} full X_Point5 Y_Point5 Z_Point5 + + if { ${X_Point1} != ${X_Point5} || + ${Y_Point1} != ${Y_Point5} || + ${Z_Point1} != ${Z_Point5} } { + puts "X_Point1=${X_Point1} X_Point5=${X_Point5}" + puts "Y_Point1=${Y_Point1} Y_Point5=${Y_Point5}" + puts "Z_Point1=${Z_Point1} Z_Point5=${Z_Point5}" + puts "Error : Get a value of TDataStd_Point attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/A8 b/tests/xml/data/ocaf/A8 new file mode 100644 index 0000000000..d9d8101927 --- /dev/null +++ b/tests/xml/data/ocaf/A8 @@ -0,0 +1,58 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "caf001-H3" +puts ${aTestName} + +set aTokList { :,} + +# Add an attribute to a data framework +set aSetX1 10 +set aSetY1 20 +set aSetZ1 30 +set aSetDX1 100 +set aSetDY1 200 +set aSetDZ1 300 +line aLine1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1} + +set aDumpLine1 [dump aLine1] + +regexp {Origin[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpLine1} full anOriginX_Line1 anOriginY_Line1 anOriginZ_Line1 +regexp {Axis[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpLine1} full anAxisDX_Line1 anAxisDY_Line1 anAxisDZ_Line1 + +set aLabel 0:2 +SetAxis D ${aLabel} aLine1 + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {GetAxis DD ${aLabel} anAxis3} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Axis attribute from restoring document" +} else { + + set aDumpAxis3 [dump anAxis3] + regexp {Origin[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpAxis3} full anOriginX_Line3 anOriginY_Line3 anOriginZ_Line3 + regexp {Axis[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpAxis3} full anAxisDX_Line3 anAxisDY_Line3 anAxisDZ_Line3 + + if { ${anOriginX_Line1} != ${anOriginX_Line3} || + ${anOriginY_Line1} != ${anOriginY_Line3} || + ${anOriginZ_Line1} != ${anOriginZ_Line3} || + ${anAxisDX_Line1} != ${anAxisDX_Line3} || + ${anAxisDY_Line1} != ${anAxisDY_Line3} || + ${anAxisDZ_Line1} != ${anAxisDZ_Line3} } { + puts "Error : Get a value of TDataStd_Axis attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/A9 b/tests/xml/data/ocaf/A9 new file mode 100644 index 0000000000..9eb64b901d --- /dev/null +++ b/tests/xml/data/ocaf/A9 @@ -0,0 +1,66 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "caf001-I3" +puts ${aTestName} + +set aTokList { :,} + +# Add an attribute to a data framework +set aSetX1 10 +set aSetY1 20 +set aSetZ1 30 +set aSetDX1 -1 +set aSetDY1 0 +set aSetDZ1 0 + +plane aPlane1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1} + +set aDumpPlane1 [dump aPlane1] + +regexp {Origin[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpPlane1} full anOriginX_Plane1 anOriginY_Plane1 anOriginZ_Plane1 +regexp {Axis[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpPlane1} full anAxisDX_Plane1 anAxisDY_Plane1 anAxisDZ_Plane1 + +set aLabel 0:2 +SetPlane D ${aLabel} aPlane1 + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {GetPlane DD ${aLabel} aPlane5} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Plane attribute from restoring document" +} else { + + set aDumpPlane5 [dump aPlane5] + + regexp {Origin[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpPlane5} full anOriginX_Plane5 anOriginY_Plane5 anOriginZ_Plane5 + regexp {Axis[ \t]*:([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} ${aDumpPlane5} full anAxisDX_Plane5 anAxisDY_Plane5 anAxisDZ_Plane5 + + if { ${anOriginX_Plane1} != ${anOriginX_Plane5} || + ${anOriginY_Plane1} != ${anOriginY_Plane5} || + ${anOriginZ_Plane1} != ${anOriginZ_Plane5} || + ${anAxisDX_Plane1} != ${anAxisDX_Plane5} || + ${anAxisDY_Plane1} != ${anAxisDY_Plane5} || + ${anAxisDZ_Plane1} != ${anAxisDZ_Plane5} } { + puts "anOriginX_Plane1=${anOriginX_Plane1} anOriginX_Plane5=${anOriginX_Plane5}" + puts "anOriginY_Plane1=${anOriginY_Plane1} anOriginY_Plane5=${anOriginY_Plane5}" + puts "anOriginZ_Plane1=${anOriginZ_Plane1} anOriginZ_Plane5=${anOriginZ_Plane5}" + puts "anAxisDX_Plane1=${anAxisDX_Plane1} anAxisDX_Plane5=${anAxisDX_Plane5}" + puts "anAxisDY_Plane1=${anAxisDY_Plane1} anAxisDY_Plane5=${anAxisDY_Plane5}" + puts "anAxisDZ_Plane1=${anAxisDZ_Plane1} anAxisDZ_Plane5=${anAxisDZ_Plane5}" + puts "Error : Get a value of TDataStd_Plane attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/B1 b/tests/xml/data/ocaf/B1 new file mode 100644 index 0000000000..3b1b62a50a --- /dev/null +++ b/tests/xml/data/ocaf/B1 @@ -0,0 +1,31 @@ +set aTestName "caf001-J3" +puts ${aTestName} + +# Add an attribute to a data framework +set aSetAttr1 "c73bd075-22ee-11d2-acde-080009dc4422" +set aLabel 0:2 +SetUAttribute D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {GetUAttribute DD ${aLabel} ${aSetAttr1}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_UAttribute attribute from restoring document" +} else { + set aGetAttr3 [GetUAttribute DD ${aLabel} ${aSetAttr1}] + + if { ${aSetAttr1}!=${aGetAttr3} } { + puts "Error : Get a value of TDataStd_UAttribute attribute from restoring document" + } +} \ No newline at end of file diff --git a/tests/xml/data/ocaf/B2 b/tests/xml/data/ocaf/B2 new file mode 100644 index 0000000000..aa0cf24186 --- /dev/null +++ b/tests/xml/data/ocaf/B2 @@ -0,0 +1,44 @@ +set aTestName "caf001-J6" +puts ${aTestName} + +# Add an attribute to a data framework +set aSetAttr1 "c73bd075-22ee-11d2-acde-080009dc4422" +set aLabel 0:2 +SetUAttribute D ${aLabel} ${aSetAttr1} + +# Add new ID to a label +set aSetAttr2 "c73bd076-22ee-11d2-acde-080009dc4422" +SetUAttribute D ${aLabel} ${aSetAttr2} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of first ID +set IsDone [catch {GetUAttribute DD ${aLabel} ${aSetAttr1}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_UAttribute attribute from restoring document" +} else { + set aGetAttr1 [GetUAttribute DD ${aLabel} ${aSetAttr1}] + if { ${aSetAttr1}!=${aGetAttr1} } { + puts "Error : Get a value of TDataStd_UAttribute attribute from restoring document" + } +} +# Get a value of second ID +set IsDone [catch {GetUAttribute DD ${aLabel} ${aSetAttr2}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_UAttribute attribute from restoring document" +} else { + set aGetAttr2 [GetUAttribute DD ${aLabel} ${aSetAttr2}] + if { ${aSetAttr2}!=${aGetAttr2} } { + puts "Error : Get a value of TDataStd_UAttribute attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/B3 b/tests/xml/data/ocaf/B3 new file mode 100644 index 0000000000..06af17aa7d --- /dev/null +++ b/tests/xml/data/ocaf/B3 @@ -0,0 +1,64 @@ +set aTestName "caf001-K3" +puts ${aTestName} + +# Add an attribute to a data framework +set aSetX1 10 +set aSetY1 20 +set aSetZ1 30 +set aSetDX1 100 +set aSetDY1 200 +set aSetDZ1 300 + +box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1} + +set aBoundingBox1 [bounding aBox1] +set X1_Box1 [lindex ${aBoundingBox1} 0] +set Y1_Box1 [lindex ${aBoundingBox1} 1] +set Z1_Box1 [lindex ${aBoundingBox1} 2] +set X2_Box1 [lindex ${aBoundingBox1} 3] +set Y2_Box1 [lindex ${aBoundingBox1} 4] +set Z2_Box1 [lindex ${aBoundingBox1} 5] + +set aLabel 0:2 +SetShape D ${aLabel} aBox1 + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {GetShape DD ${aLabel} aBox5} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Shape attribute from restoring document" +} else { + set aBoundingBox5 [bounding aBox5] + set X1_Box5 [lindex ${aBoundingBox5} 0] + set Y1_Box5 [lindex ${aBoundingBox5} 1] + set Z1_Box5 [lindex ${aBoundingBox5} 2] + set X2_Box5 [lindex ${aBoundingBox5} 3] + set Y2_Box5 [lindex ${aBoundingBox5} 4] + set Z2_Box5 [lindex ${aBoundingBox5} 5] + + if { ${X1_Box1} != ${X1_Box5} || + ${Y1_Box1} != ${Y1_Box5} || + ${Z1_Box1} != ${Z1_Box5} || + ${X2_Box1} != ${X2_Box5} || + ${Y2_Box1} != ${Y2_Box5} || + ${Z2_Box1} != ${Z2_Box5} } { + puts "X1_Box1=${X1_Box1} X1_Box5=${X1_Box5}" + puts "Y1_Box1=${Y1_Box1} Y1_Box5=${Y1_Box5}" + puts "Z1_Box1=${Z1_Box1} Z1_Box5=${Z1_Box5}" + puts "X2_Box1=${X2_Box1} X2_Box5=${X2_Box5}" + puts "Y2_Box1=${Y2_Box1} Y2_Box5=${Y2_Box5}" + puts "Z2_Box1=${Z2_Box1} Z2_Box5=${Z2_Box5}" + puts "Error : et a value of TDataStd_Shape attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/B4 b/tests/xml/data/ocaf/B4 new file mode 100644 index 0000000000..e1b0fb1027 --- /dev/null +++ b/tests/xml/data/ocaf/B4 @@ -0,0 +1,55 @@ +set aTestName "caf001-L3" +puts $aTestName +set LabelsList [list \ + 0:3 \ + 0:2076534922:524398634:912349856 \ + 0:3:9283:12:1:9843:46793:321 \ + 0:4:81245034:321:1:1:1:345:8542:1:90:6453 \ + 0:5:8:4:2:213:3242:123456789:987654321 \ + 0:2:15:123:31214:452398:421:3:2:1:3:1:2:9:10:2:1:1:4 \ + 0:2:2:1:1:1:3:1:2:1:34:1:2:4:1:5:4:1:9:3:1:2:1:8:2:3:1:9:5:2:7 \ + 0:2:9] +# Add an attribute to a data framework +set i "0" +set ref [lindex $LabelsList end] +SetInteger D $ref $i +foreach Label $LabelsList { + set i [expr "$i + 1"] + SetInteger D $Label $i + SetReference D $Label $ref + set ref $Label +} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open $aFile DD + +# Check the restored values + +set ListLen [llength $LabelsList] +set i $ListLen +foreach Label $LabelsList { + set IsDone [catch { set aRef [GetReference DD $Label] } aResult] + if ${IsDone} { + puts "Error : Get a TDF_Reference attribute from restored document" + } + set IsDone [catch { set anInt [GetInteger DD $aRef] } aResult] + if ${IsDone} { + puts "Error : Get the integer under the referenced label from restored document" + } + if { $anInt == $i } { + puts "Comparison OK for ref $aRef on $Label: $anInt = $i" + } else { + puts "Error : $anInt != $i : wrong integer value restored" + } + set i [expr "($i + 1) % $ListLen"] +} + diff --git a/tests/xml/data/ocaf/B5 b/tests/xml/data/ocaf/B5 new file mode 100644 index 0000000000..197515b455 --- /dev/null +++ b/tests/xml/data/ocaf/B5 @@ -0,0 +1,73 @@ +set aTestName "caf002-C1" +puts ${aTestName} + +# Create a box +set aSetX1 10 +set aSetY1 20 +set aSetZ1 30 +set aSetDX1 100 +set aSetDY1 200 +set aSetDZ1 300 + +box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1} + +set aBoundingBox1 [bounding aBox1] +set X1_Box1 [lindex ${aBoundingBox1} 0] +set Y1_Box1 [lindex ${aBoundingBox1} 1] +set Z1_Box1 [lindex ${aBoundingBox1} 2] +set X2_Box1 [lindex ${aBoundingBox1} 3] +set Y2_Box1 [lindex ${aBoundingBox1} 4] +set Z2_Box1 [lindex ${aBoundingBox1} 5] + +# Create a label +set aLabel 0:2 +Label D ${aLabel} + +# Close/Open transaction +NewCommand D + +# Set a shape to the label +SetShape D ${aLabel} aBox1 + +# Close/Open transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a shape from the label +set IsDone [catch {GetShape DD ${aLabel} aBox3} aResult] +if { ${IsDone} != 0 } { + puts ${aResult} + puts "Error : Get a value of TNaming_NamedShape attribute from restoring document" +} else { + set aBoundingBox3 [bounding aBox3] + set X1_Box3 [lindex ${aBoundingBox3} 0] + set Y1_Box3 [lindex ${aBoundingBox3} 1] + set Z1_Box3 [lindex ${aBoundingBox3} 2] + set X2_Box3 [lindex ${aBoundingBox3} 3] + set Y2_Box3 [lindex ${aBoundingBox3} 4] + set Z2_Box3 [lindex ${aBoundingBox3} 5] + + if { ${X1_Box1} != ${X1_Box3} || + ${Y1_Box1} != ${Y1_Box3} || + ${Z1_Box1} != ${Z1_Box3} || + ${X2_Box1} != ${X2_Box3} || + ${Y2_Box1} != ${Y2_Box3} || + ${Z2_Box1} != ${Z2_Box3} } { + puts "X1_Box1=${X1_Box1} X1_Box3=${X1_Box3}" + puts "Y1_Box1=${Y1_Box1} Y1_Box3=${Y1_Box3}" + puts "Z1_Box1=${Z1_Box1} Z1_Box3=${Z1_Box3}" + puts "X2_Box1=${X2_Box1} X2_Box3=${X2_Box3}" + puts "Y2_Box1=${Y2_Box1} Y2_Box3=${Y2_Box3}" + puts "Z2_Box1=${Z2_Box1} Z2_Box3=${Z2_Box3}" + puts "Error : Get a value of TNaming_NamedShape attribute from restoring document" + } +} + diff --git a/tests/xml/data/ocaf/B6 b/tests/xml/data/ocaf/B6 new file mode 100644 index 0000000000..ea6734af5b --- /dev/null +++ b/tests/xml/data/ocaf/B6 @@ -0,0 +1,35 @@ +set aTestName "caf003-A4" +puts ${aTestName} + +# Set NamedShape attribute +box aBox1 100 200 300 +set aLabel 0:2 +SetShape D ${aLabel} aBox1 + +# Initialize 3D viewer +AISInitViewer D + +# Add AISPresentation attribute with parameter NS +AISSet D ${aLabel} NS + +# Display presentation of NamedShape in the viewer +AISDisplay D ${aLabel} + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Initialize 3D viewer +AISInitViewer DD + +# Display presentation of NamedShape in the viewer +set IsDone [catch {AISDisplay DD ${aLabel}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TPrsStd_AISPresentation attribute from restoring document" +} + diff --git a/tests/xml/data/ocaf/B7 b/tests/xml/data/ocaf/B7 new file mode 100644 index 0000000000..469a33c3d9 --- /dev/null +++ b/tests/xml/data/ocaf/B7 @@ -0,0 +1,87 @@ +set aTestName "caf004-B3" +puts ${aTestName} + +# Create two new documents Doc1, Doc2 +set FileFormat "MDTV-Standard" +if { $FileSuffix == "xml" } { + set FileFormat "XmlOcaf" +} +NewDocument Doc1 $FileFormat +NewDocument Doc2 $FileFormat + +# Set UndoLimit for them +UndoLimit Doc1 100 +UndoLimit Doc2 100 + +# Set a shape in Doc1 to label 'SLabel' +set aLabel1 0:2 +Label Doc1 ${aLabel1} +SetName Doc1 ${aLabel1} SLabel + +set aSetX1 10 +set aSetY1 20 +set aSetZ1 30 +set aSetDX1 100 +set aSetDY1 200 +set aSetDZ1 300 + +box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1} + +set aBoundingBox1 [bounding aBox1] +set X1_Box1 [lindex ${aBoundingBox1} 0] +set Y1_Box1 [lindex ${aBoundingBox1} 1] +set Z1_Box1 [lindex ${aBoundingBox1} 2] +set X2_Box1 [lindex ${aBoundingBox1} 3] +set Y2_Box1 [lindex ${aBoundingBox1} 4] +set Z2_Box1 [lindex ${aBoundingBox1} 5] + +SetShape Doc1 ${aLabel1} aBox1 + +# Create a new label 'TLabel1' in Doc1 +set aLabel2 0:3 +Label Doc1 ${aLabel2} +SetName Doc1 ${aLabel2} TLabel1 + +# Open transaction in Doc1 +NewCommand Doc1 + +# Copy 'SLabel' to the label 'TLabel1' with link +CopyWithLink Doc1 ${aLabel2} Doc1 ${aLabel1} + +# Close/Open transaction +NewCommand Doc1 + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile Doc1 $aFile + +# Restore the document +Close Doc1 +Open ${aFile} Doc2 + +# Get a shape from 'TLabel1' of restoring document +set IsDone [catch {GetShape Doc2 ${aLabel2} aBox2} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TNaming_NamedShape attribute from restoring document" +} else { + set aBoundingBox2 [bounding aBox2] + set X1_Box2 [lindex ${aBoundingBox2} 0] + set Y1_Box2 [lindex ${aBoundingBox2} 1] + set Z1_Box2 [lindex ${aBoundingBox2} 2] + set X2_Box2 [lindex ${aBoundingBox2} 3] + set Y2_Box2 [lindex ${aBoundingBox2} 4] + set Z2_Box2 [lindex ${aBoundingBox2} 5] + + if { ${X1_Box1} != ${X1_Box2} || + ${Y1_Box1} != ${Y1_Box2} || + ${Z1_Box1} != ${Z1_Box2} || + ${X2_Box1} != ${X2_Box2} || + ${Y2_Box1} != ${Y2_Box2} || + ${Z2_Box1} != ${Z2_Box2} } { + puts "X1_Box1=${X1_Box1} Y1_Box1=${Y1_Box1} Z1_Box1=${Z1_Box1} X2_Box1=${X2_Box1} Y2_Box1=${Y2_Box1} Z2_Box1=${Z2_Box1}" + puts "X1_Box2=${X1_Box2} Y1_Box2=${Y1_Box2} Z1_Box2=${Z1_Box2} X2_Box2=${X2_Box2} Y2_Box2=${Y2_Box2} Z2_Box2=${Z2_Box2}" + puts "Error : Get a link between attributes of the same document from restoring document" + } +} + diff --git a/tests/xml/data/ocaf/B8 b/tests/xml/data/ocaf/B8 new file mode 100644 index 0000000000..dcb19daf3c --- /dev/null +++ b/tests/xml/data/ocaf/B8 @@ -0,0 +1,35 @@ +set aTestName "caf005-A3" +puts ${aTestName} + +# Add an attribute to a data framework +set aLabel1 0:2 +set aName1 Label1 +Label D ${aLabel1} +SetName D ${aLabel1} ${aName1} + +set aName11 Label11 +set aChild1 [NewChild D ${aLabel1}] +set aChild1 0:2:1 +SetName D ${aChild1} ${aName11} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aNewTag [NewTag DD 0:2]} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDF_TagSource attribute from restoring document" +} else { + if { ${aNewTag} != 2 } { + puts "Error : Get a value of TDF_TagSource attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/B9 b/tests/xml/data/ocaf/B9 new file mode 100644 index 0000000000..50e9db5092 --- /dev/null +++ b/tests/xml/data/ocaf/B9 @@ -0,0 +1,26 @@ +set aTestName "caf005-B3" +puts ${aTestName} + +# Add an attribute to a data framework +set aLabel1 0:2 +NewDirectory D ${aLabel1} +set aName1 Label1 +SetName D ${aLabel1} ${aName1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetName1 [GetName DD ${aLabel1}]} aResult] +if { ${IsDone} != 0 || ${aName1}!=${aGetName1} } { + puts "Error : Get a value of TDataStd_Directory attribute from restoring document" +} diff --git a/tests/xml/data/ocaf/C1 b/tests/xml/data/ocaf/C1 new file mode 100644 index 0000000000..b7fda4c156 --- /dev/null +++ b/tests/xml/data/ocaf/C1 @@ -0,0 +1,45 @@ +set aTestName "caf005-C2" +puts ${aTestName} + +# Add an attribute to a data framework +set aName_Root Label_1 +set aLabel_Root 0:2 +Label D ${aLabel_Root} + +SetName D ${aLabel_Root} ${aName_Root} + +SetNode D ${aLabel_Root} + +Label D 0:7 +Label D 0:8 +Label D 0:9 + +SetNode D 0:7 +SetNode D 0:8 +SetNode D 0:9 + +AppendNode D ${aLabel_Root} 0:7 +AppendNode D ${aLabel_Root} 0:8 +AppendNode D ${aLabel_Root} 0:9 + +# Close/Open the transaction +NewCommand D + +# Save result for check after retrieval +set dump1 [ChildNodeIterate D ${aLabel_Root} 0] + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set aGetLabel_Root "" +set IsDone [catch {set dump2 [ChildNodeIterate DD ${aLabel_Root} 0]} aResult] +if { ${IsDone} != 0 || ${dump1} != ${dump2} } { + puts "Error : Get a value of TDataStd_TreeNode attribute from restoring document" +} diff --git a/tests/xml/data/ocaf/C2 b/tests/xml/data/ocaf/C2 new file mode 100644 index 0000000000..58da100d60 --- /dev/null +++ b/tests/xml/data/ocaf/C2 @@ -0,0 +1,72 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "caf100-A1" +puts ${aTestName} + +# Create a box +set aSetX1 10 +set aSetY1 20 +set aSetZ1 30 +set aSetDX1 100 +set aSetDY1 200 +set aSetDZ1 300 + +box aBox1 ${aSetX1} ${aSetY1} ${aSetZ1} ${aSetDX1} ${aSetDY1} ${aSetDZ1} + +# Create a label +set aLabel 0:2 +Label D ${aLabel} + +# Close/Open transaction +NewCommand D + +# Set a shape to the label +SetShape D ${aLabel} aBox1 + +# Close/Open transaction +NewCommand D + +# Set a real attribute +set aRLabel 0:1:1 +Label D ${aRLabel} +SetReal D ${aRLabel} 123.456789 + +# Set a constraint +set aCLabel 0:3 +Label D ${aCLabel} +SetConstraint D ${aCLabel} "tan" ${aLabel} +SetConstraint D ${aCLabel} "plane" ${aLabel} +SetConstraint D ${aCLabel} "value" ${aRLabel} + +# Save dump before storing +set dump_before [GetConstraint D ${aCLabel}] +puts "dump_before = ${dump_before}" + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a shape from the label +set IsDone [catch {GetConstraint DD ${aCLabel}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Constraint attribute from restoring document" +} else { + puts "aResult = ${aResult}" + + # Save dump after retrieving + set dump_after [GetConstraint DD ${aCLabel}] + puts "dump_after = ${dump_after}" + + if { ${dump_before} != ${dump_after} } { + puts "dump_after = ${dump_after} while dump_before = ${dump_before}" + puts "Error : Get a value of TDataStd_Constraint attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/C3 b/tests/xml/data/ocaf/C3 new file mode 100644 index 0000000000..9d22124255 --- /dev/null +++ b/tests/xml/data/ocaf/C3 @@ -0,0 +1,47 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "caf100-B1" +puts ${aTestName} + +box aBox1 10 20 30 100 200 300 + +# Create a label +set aLabel 0:2 +Label D ${aLabel} + +# Close/Open transaction +NewCommand D + +# Set a Geometry +set asettype "pnt" +SetGeometry D ${aLabel} ${asettype} aBox1 + +# Close/Open transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a geometry type from the label +set IsDone [catch {GetGeometryType DD ${aLabel}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Geometry attribute from restoring document" +} else { + + # Check the type + set atype [GetGeometryType DD ${aLabel}] + puts "atype = ${atype}" + + if { ${atype} != ${asettype} } { + puts "Error : Get a value of TDataStd_Geometry attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/C4 b/tests/xml/data/ocaf/C4 new file mode 100644 index 0000000000..a5d81152ac --- /dev/null +++ b/tests/xml/data/ocaf/C4 @@ -0,0 +1,40 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" +} + +set aTestName "caf100-C1" +puts ${aTestName} + +box ab 10 20 777 +NewShape D 0:1 ab + +# Close/Open transaction +NewCommand D + +# Create a label +set aLabel 0:1:1 + +# Set a Naming attribute +SelectShape D ${aLabel} ab + +# Close/Open transaction +NewCommand D + +# Dump selection to check result +DumpSelection D ${aLabel} + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Check the result +set IsDone [catch {DumpSelection DD ${aLabel}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TNaming_Naming attribute from restoring document" +} + diff --git a/tests/xml/data/ocaf/C5 b/tests/xml/data/ocaf/C5 new file mode 100644 index 0000000000..b6a5a2a8a3 --- /dev/null +++ b/tests/xml/data/ocaf/C5 @@ -0,0 +1,67 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "caf100-D1" +puts ${aTestName} + +# Create a box +box aBox1 10 20 30 100 200 300 + +# Close/Open transaction +NewCommand D + +# Set a shape to the label +set aBLabel 0:2 +Label D ${aBLabel} +SetShape D ${aBLabel} aBox1 + +# Close/Open transaction +NewCommand D + +# Set a real attribute +set aRLabel 0:3 +Label D ${aRLabel} +SetReal D ${aRLabel} 123.456789 + +# Set an integer attribute +set anILabel 0:4 +Label D ${anILabel} +SetInteger D ${anILabel} 123456789 + +# Set a signature +set signature 1 + +# Set a pattern +set aCLabel 0:1:1 +Label D ${aCLabel} +SetPattern D ${aCLabel} ${signature} ${aBLabel} ${aRLabel} ${anILabel} + +# Save dump before storing +set dump_before [DumpPattern D ${aCLabel}] +puts "dump_before = ${dump_before}" + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a shape from the label +set IsDone [catch {DumpPattern DD ${aCLabel}} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_PatternStd attribute from restoring document" +} else { + + # Save dump after retrieving + set dump_after [DumpPattern DD ${aCLabel}] + puts "dump_after = ${dump_after}" + + if { ${dump_before} != ${dump_after} } { + puts "Error : Get a value of TDataStd_PatternStd attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/C6 b/tests/xml/data/ocaf/C6 new file mode 100644 index 0000000000..a08d188dc1 --- /dev/null +++ b/tests/xml/data/ocaf/C6 @@ -0,0 +1,37 @@ +set aTestName "caf100-F1" +puts ${aTestName} + +# Set a driver guid +set driverGuid "5b35ca00-5b78-11d1-8940-080009dc3333" + +# Set a failure +set failureNb 13 + +# Set a function attribute +set aCLabel 0:1:1 +Label D ${aCLabel} +SetFunction D ${aCLabel} ${driverGuid} ${failureNb} + +# Save the document +set aFile ${WorkDirectory}/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a variable from the label +set IsDone [catch {GetFunction DD ${aCLabel} driverGuid2 failureNb2} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TFunction_Function attribute from restoring document" +} else { + + if { ${failureNb2} != ${failureNb} } { + puts "Error : Get a value of TFunction_Function attribute from restoring document" + } + + if { ${driverGuid2} != ${driverGuid} } { + puts "Error : Get a value of TFunction_Function attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/C7 b/tests/xml/data/ocaf/C7 new file mode 100644 index 0000000000..a9b76467de --- /dev/null +++ b/tests/xml/data/ocaf/C7 @@ -0,0 +1,37 @@ +if { [string compare $subgroup "ocaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "caf100-P1" +puts ${aTestName} + +# Set a coordinates +set X 123.456 +set Y 789.012 +set Z 345.678 + +# Set a position attribute +set aCLabel 0:1:1 +Label D ${aCLabel} +SetPosition D ${aCLabel} ${X} ${Y} ${Z} + +# Save the document +set aFile ${WorkDirectory}/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a variable from the label +set IsDone [catch {GetPosition DD ${aCLabel} X2 Y2 Z2} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TPrsStd_Position attribute from restoring document" +} else { + + if { ${X2} != ${X} || ${Y2} != ${Y} || ${Z2} != ${Z}} { + puts "Error : Get a value of TPrsStd_Position attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/C8 b/tests/xml/data/ocaf/C8 new file mode 100644 index 0000000000..b9796022bb --- /dev/null +++ b/tests/xml/data/ocaf/C8 @@ -0,0 +1,46 @@ +set aTestName "caf100-R1" +puts ${aTestName} + +# Set a variables +set aV1Label 0:1:1 +set aV2Label 0:1:2 +set aV3Label 0:1:3 + +Label D ${aV1Label} +Label D ${aV2Label} +Label D ${aV3Label} + +SetVariable D ${aV1Label} 1 "N" +SetVariable D ${aV2Label} 0 "kg" +SetVariable D ${aV3Label} 0 "m/s2" + +# Set an expression +set expression "f = m*a" + +# Set a relation +set aRLabel 0:1:13 +Label D ${aRLabel} +SetRelation D ${aRLabel} $expression $aV1Label $aV2Label $aV3Label + +# Save a result for check after retrieval +set dump_before [DumpRelation D ${aRLabel}] + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a variable from the label +set IsDone [catch {set dump_after [DumpRelation DD ${aRLabel}]} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Relation attribute from restoring document" +} else { + + if { ${dump_after} != ${dump_before} } { + puts "Error : Get a value of TDataStd_Relation attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/C9 b/tests/xml/data/ocaf/C9 new file mode 100644 index 0000000000..ee7f50779d --- /dev/null +++ b/tests/xml/data/ocaf/C9 @@ -0,0 +1,38 @@ +set aTestName "caf100-V1" +puts ${aTestName} + +# Set isConstant +set isConstant 1 + +# Set a units +set units "kg/m3" + +# Set a variable +set aCLabel 0:1:1 +Label D ${aCLabel} +SetVariable D ${aCLabel} ${isConstant} ${units} + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a variable from the label +set IsDone [catch {GetVariable DD ${aCLabel} isC2 units2} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Variable attribute from restoring document" +} else { + + if { ${isC2} != ${isConstant} } { + puts "Error : Get a value of TDataStd_Variable attribute from restoring document" + } + + if { ${units2} != ${units} } { + puts "Error : Get a value of TDataStd_Variable attribute from restoring document" + } +} + diff --git a/tests/xml/data/ocaf/D1 b/tests/xml/data/ocaf/D1 new file mode 100644 index 0000000000..b7ca6489ad --- /dev/null +++ b/tests/xml/data/ocaf/D1 @@ -0,0 +1,41 @@ +set aTestName "caf001-E3" +puts ${aTestName} +set LabelsList { \ + { 0:11 "Tu sais je n'ai jamais t aussi hereux que ce matin-l" } \ + { 0:12 "\"Tu sais je n'ai jamais t aussi hereux que ce matin-l\"" } \ + { 0:13 "" } \ + { 0:14 "Tu m'as dit \"J'ai rendez-vous dans un sous-sol avec des fous" } \ + { 0:15 "\"Tu m'as dit \"J'ai rendez-vous dans un sous-sol avec des fous\"" } \ + { 0:16 "Il dans ce monde triste" } \ +} + +# Add an attribute to a data framework +foreach Label $LabelsList { + Label D [lindex $Label 0] + SetName D [lindex $Label 0] [lindex $Label 1] +} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Check the restored values + +foreach Label $LabelsList { + set IsDone [catch { set aGetAttr [GetName DD [lindex $Label 0]] } aResult] + if $IsDone { + puts "Error : Get a TDataStd_Name attribute from restored document" + } else { + if [string compare $aGetAttr [lindex $Label 1]] { + puts "Error : different strings" + } + } +} diff --git a/tests/xml/data/ocaf/D2 b/tests/xml/data/ocaf/D2 new file mode 100644 index 0000000000..afaa41c274 --- /dev/null +++ b/tests/xml/data/ocaf/D2 @@ -0,0 +1,57 @@ +set aTestName "caf001-L3" +puts $aTestName +set LabelsList [list \ + 0:3 \ + 0:2076534922:524398634:912349856 \ + 0:3:9283:12:1:9843:46793:321 \ + 0:4:81245034:321:1:1:1:345:8542:1:90:6453 \ + 0:5:8:4:2:213:3242:123456789:987654321 \ + 0:2:15:123:31214:452398:421:3:2:1:3:1:2:9:10:2:1:1:4 \ + 0:2:2:1:1:1:3:1:2:1:34:1:2:4:1:5:4:1:9:3:1:2:1:8:2:3:1:9:5:2:7 \ + 0:2:9] + +# Add an attribute to a data framework + +set i "0" +set ref [lindex $LabelsList end] +SetInteger D $ref $i +foreach Label $LabelsList { + set i [expr "$i + 1"] + SetInteger D $Label $i + SetReference D $Label $ref + set ref $Label +} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open $aFile DD + +# Check the restored values + +set ListLen [llength $LabelsList] +set i $ListLen +foreach Label $LabelsList { + set IsDone [catch { set aRef [GetReference DD $Label] } aResult] + if ${IsDone} { + puts "Error : Get a TDF_Reference attribute from restored document" + } + set IsDone [catch { set anInt [GetInteger DD $aRef] } aResult] + if ${IsDone} { + puts "Error : Get the integer under the referenced label from restored document" + } + if { $anInt == $i } { + puts "Comparison OK for ref $aRef on $Label: $anInt = $i" + } else { + puts "Error : comparison $anInt != $i : wrong integer value restored" + } + set i [expr "($i + 1) % $ListLen"] +} + diff --git a/tests/xml/data/ocaf/D3 b/tests/xml/data/ocaf/D3 new file mode 100644 index 0000000000..fcadececc1 --- /dev/null +++ b/tests/xml/data/ocaf/D3 @@ -0,0 +1,46 @@ +set aTestName "caf100-R1" +puts ${aTestName} + +# Set a variables +set aV1Label 0:1:1 +set aV2Label 0:1:2 +set aV3Label 0:1:3 + +Label D ${aV1Label} +Label D ${aV2Label} +Label D ${aV3Label} + +SetVariable D ${aV1Label} 1 "N" +SetVariable D ${aV2Label} 0 "kg" +SetVariable D ${aV3Label} 0 "µ/s²" + +# Set an expression +set expression "f = m*a" + +# Set a relation +set aRLabel 0:1:13 +Label D ${aRLabel} +SetRelation D ${aRLabel} $expression $aV1Label $aV2Label $aV3Label + +# Save a result for check after retrieval +set dump_before [DumpRelation D ${aRLabel}] + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a variable from the label +set IsDone [catch {set dump_after [DumpRelation DD ${aRLabel}]} aResult] +if { ${IsDone} != 0 } { + puts "Error : Get a value of TDataStd_Relation attribute from restoring document" +} else { + + if { ${dump_after} != ${dump_before} } { + puts "Error : Get a value of TDataStd_Relation attribute from restoring document" + } +} diff --git a/tests/xml/data/ocaf/D4 b/tests/xml/data/ocaf/D4 new file mode 100644 index 0000000000..f7505af02d --- /dev/null +++ b/tests/xml/data/ocaf/D4 @@ -0,0 +1,46 @@ +set aTestName "xml001-D5" +puts ${aTestName} + +set QA_DUP 0 + +# Add an attribute to a data framework +set aFrom1 1 +set aTo1 1 +set aSetAttr11 3 +set aSetAttr12 4 +set aLabel 0:2 +set isDelta 0 +SetIntArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsGood 1 +set IsDone [catch {set aGetAttr3 [GetIntArray DD ${aLabel}]} aResult] +if { ${IsDone} != 0 } { + set IsGood 0 + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" +} +set aLen3 [llength ${aGetAttr3}] +if { ${aLen3} != [expr ${aTo1} - ${aFrom1} + 1] } { + set IsGood 0 + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" +} +set aGetAttr41 [lindex ${aGetAttr3} 0] +if { ${aSetAttr11} != ${aGetAttr41} } { + set IsGood 0 + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" +} +if { ${IsGood} == 0} { + puts "Error : Get a value of TDataStd_IntegerArray attribute from restoring document" +} diff --git a/tests/xml/data/ocaf/D5 b/tests/xml/data/ocaf/D5 new file mode 100644 index 0000000000..15309d7eee --- /dev/null +++ b/tests/xml/data/ocaf/D5 @@ -0,0 +1,47 @@ +set aTestName "xml001-D6" +puts $aTestName + +set QA_DUP 0 + +# Add an attribute to a data framework +set aFrom1 1 +set aTo1 1 +set aSetAttr11 3. +set aSetAttr12 4. +set aLabel 0:2 +set isDelta 0 +SetRealArray D ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr12} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsGood 1 +set IsDone [catch {set aGetAttr3 [GetRealArray DD ${aLabel}]} aResult] +if { ${IsDone} != 0 } { + set IsGood 0 + puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" +} +set aLen3 [llength ${aGetAttr3}] +if { ${aLen3} != [expr ${aTo1} - ${aFrom1} + 1] } { + set IsGood 0 + puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" +} +set aGetAttr41 [lindex ${aGetAttr3} 0] +if { ${aSetAttr11} != ${aGetAttr41} } { + set IsGood 0 + puts "Error : Get a value of TDataStd_RealArray attribute from restoring document" +} +if { ${IsGood} == 0} { + puts "Get a value of TDataStd_RealArray attribute from restoring document: Error" +} + diff --git a/tests/xml/data/ocaf/D6 b/tests/xml/data/ocaf/D6 new file mode 100644 index 0000000000..f6a43549c0 --- /dev/null +++ b/tests/xml/data/ocaf/D6 @@ -0,0 +1,41 @@ +puts "============" +puts "OCC16497" +puts "============" +puts "" +####################################################################### +# XML OCAF storage of document on disk looses "0" in "00", "000", etc. +####################################################################### + +set BugNumber OCC16497 + +set aTestName "xml001-D7" +puts ${aTestName} + +# Add an attribute to a data framework +set aSetAttr1 "00" +set aLabel 0:2 +Label D ${aLabel} +SetName D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +if { ![file exists ${aFile}] } { + puts "There is not ${aFile} file; SaveAs command: Error" + puts "Error : ${BugNumber} (case 1)" +} + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetAttr3 [GetName DD ${aLabel}]} aResult] +if { ${IsDone} != 0 || ${aSetAttr1}!=${aGetAttr3} } { + puts "Error : Get a value of TDataStd_Name attribute from restoring document ${BugNumber}" +} diff --git a/tests/xml/data/xcaf/A1 b/tests/xml/data/xcaf/A1 new file mode 100644 index 0000000000..35134a7492 --- /dev/null +++ b/tests/xml/data/xcaf/A1 @@ -0,0 +1,38 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "xcaf200-A1" +puts $aTestName + +# Add an attribute to a data framework +set aLabel 0:1:1:1 +Label D $aLabel +set aValue 13.777 +XSetArea D $aLabel $aValue + +# Close/Open the transaction +NewCommand D + +# save result for check after retrieval +set area_before [XGetArea D $aLabel] +if { ${area_before} != ${aValue} } { + puts "Error : XSetArea or XGetArea" +} else { + + # Save the document + set aFile $WorkDirectory/${aTestName}.${FileSuffix} + + SaveToFile D $aFile + + # Restore the document + Close D + Open ${aFile} DD + + # Get a value of the attribute + set IsDone [catch {set area_after [XGetArea DD $aLabel]} aResult] + if { ${IsDone} != 0 || ${area_after} != ${area_before} } { + puts "Error : Get a value of XCAFDoc_Area attribute from restoring document" + } +} diff --git a/tests/xml/data/xcaf/A2 b/tests/xml/data/xcaf/A2 new file mode 100644 index 0000000000..b524c76e06 --- /dev/null +++ b/tests/xml/data/xcaf/A2 @@ -0,0 +1,22 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "SATCOM" +puts $aTestName + +stepread [locate_data_file 1_SATCOM_BIRD_7.stp] aShape * +XAddShape D aShape_1 + +# Close the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD diff --git a/tests/xml/data/xcaf/A3 b/tests/xml/data/xcaf/A3 new file mode 100644 index 0000000000..cb5ab247dc --- /dev/null +++ b/tests/xml/data/xcaf/A3 @@ -0,0 +1,18 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "SATCOM1" +puts $aTestName + +ReadStep D [locate_data_file 1_SATCOM_BIRD_7.stp] + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD diff --git a/tests/xml/data/xcaf/A4 b/tests/xml/data/xcaf/A4 new file mode 100644 index 0000000000..6ce33c51a4 --- /dev/null +++ b/tests/xml/data/xcaf/A4 @@ -0,0 +1,31 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "xcaf200-C1" +puts $aTestName + +# Add an attribute to a data framework +set aLabel [XAddColor D 0.3 0.3 0.3] + +# Close/Open the transaction +NewCommand D + +# save result for check after retrieval +set color_before [XGetColor D $aLabel] + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set color_after [XGetColor DD $aLabel]} aResult] +if { ${IsDone} != 0 || ${color_after} != ${color_before} } { + puts "Error : Get a value of XCAFDoc_Color attribute from restoring document" +} diff --git a/tests/xml/data/xcaf/A5 b/tests/xml/data/xcaf/A5 new file mode 100644 index 0000000000..bbb2673b8b --- /dev/null +++ b/tests/xml/data/xcaf/A5 @@ -0,0 +1,30 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "xcaf200-D1" +puts $aTestName + +# Add an attribute to a data framework +set aLabel 0:1:1:1 +Label D $aLabel +set coords_before [XSetCentroid D $aLabel 12.34 56.78 90.12] + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set coords_after [XGetCentroid DD $aLabel]} aResult] +if { ${IsDone} != 0 || ${coords_after} != ${coords_before} } { + puts "Error : Get a value of XCAFDoc_Centroid attribute from restoring document" +} diff --git a/tests/xml/data/xcaf/A6 b/tests/xml/data/xcaf/A6 new file mode 100644 index 0000000000..33033d6f54 --- /dev/null +++ b/tests/xml/data/xcaf/A6 @@ -0,0 +1,46 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +puts "============" +puts "OCC16497" +puts "============" +puts "" +####################################################################### +# XML OCAF storage of document on disk looses "0" in "00", "000", etc. +####################################################################### + +set BugNumber OCC16497 + +set aTestName "xml001-D7" +puts ${aTestName} + +# Add an attribute to a data framework +set aSetAttr1 "00" +set aLabel 0:2 +Label D ${aLabel} +SetName D ${aLabel} ${aSetAttr1} + +# Close/Open the transaction +NewCommand D + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +if { ![file exists ${aFile}] } { + puts "Error : ${BugNumber} (case 1)" +} + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set aGetAttr3 [GetName DD ${aLabel}]} aResult] +puts "aSetAttr1=${aSetAttr1} aGetAttr3=${aGetAttr3}" +if { ${IsDone} != 0 || ${aSetAttr1}!=${aGetAttr3} } { + puts "Error : Get a value of TDataStd_Name attribute from restoring document ${BugNumber}" +} diff --git a/tests/xml/data/xcaf/A7 b/tests/xml/data/xcaf/A7 new file mode 100644 index 0000000000..e8a06ee801 --- /dev/null +++ b/tests/xml/data/xcaf/A7 @@ -0,0 +1,34 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "xcaf200-G1" +puts $aTestName + +box aBox 10 20 30 + +# Add an attribute to a data framework +set aShLabel [XAddShape D aBox] +set layer_before "Layer_1" +set aLaLabel [XAddLayer D ${layer_before}] +XSetLinkLayer D $aShLabel $aLaLabel + +# Close/Open the transaction +NewCommand D +set layer_before [XGetLayers D $aShLabel] + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set layer_after [XGetLayers DD $aShLabel]} aResult] +if { ${IsDone} != 0 || ${layer_after} != ${layer_before} } { + puts "Error : Get a value of XCAFDoc_GraphNode attribute from restoring document" +} diff --git a/tests/xml/data/xcaf/A8 b/tests/xml/data/xcaf/A8 new file mode 100644 index 0000000000..2193cd541a --- /dev/null +++ b/tests/xml/data/xcaf/A8 @@ -0,0 +1,35 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "xcaf200-L1" +puts $aTestName + +# Add an attribute to a data framework +set aLabel [XNewShape D] +box aB 10 20 30 +ttranslate aB 333 777 13 +XAddComponent D $aLabel aB +set aLabel ${aLabel}:1 + +# Close/Open the transaction +NewCommand D + +# save result for check after retrieval +set location_before [XDumpLocation D $aLabel] + +# Save the document +set aFile $WorkDirectory/${aTestName}.${FileSuffix} + +SaveToFile D $aFile + +# Restore the document +Close D +Open ${aFile} DD + +# Get a value of the attribute +set IsDone [catch {set location_after [XDumpLocation DD $aLabel]} aResult] +if { ${IsDone} != 0 || ${location_after} != ${location_before} } { + puts "Error : Get a value of XCAFDoc_Location attribute from restoring document" +} diff --git a/tests/xml/data/xcaf/A9 b/tests/xml/data/xcaf/A9 new file mode 100644 index 0000000000..fa90d4df9d --- /dev/null +++ b/tests/xml/data/xcaf/A9 @@ -0,0 +1,38 @@ +if { [string compare $subgroup "xcaf_xml"] == 0 } { + puts "TODO ?OCC23768 ALL: Error : File is not valid" + puts "TODO ?OCC23768 ALL: Error at line" +} + +set aTestName "xcaf200-V1" +puts $aTestName + +# Add an attribute to a data framework +set aLabel 0:1:1:1 +Label D $aLabel +set aValue 13.777 +XSetVolume D $aLabel $aValue + +# Close/Open the transaction +NewCommand D + +# save result for check after retrieval +set vol_before [XGetVolume D $aLabel] +if { ${vol_before} != ${aValue} } { + puts "Error : XSetVolume or XGetVolume" +} else { + + # Save the document + set aFile $WorkDirectory/${aTestName}.${FileSuffix} + + SaveToFile D $aFile + + # Restore the document + Close D + Open ${aFile} DD + + # Get a value of the attribute + set IsDone [catch {set vol_after [XGetVolume DD $aLabel]} aResult] + if { ${IsDone} != 0 || ${vol_after} != ${vol_before} } { + puts "Error : Get a value of XCAFDoc_Volume attribute from restoring document" + } +} diff --git a/tests/xml/end b/tests/xml/end new file mode 100755 index 0000000000..16118e6262 --- /dev/null +++ b/tests/xml/end @@ -0,0 +1,2 @@ +puts "TEST COMPLETED" + diff --git a/tests/xml/grids.list b/tests/xml/grids.list new file mode 100644 index 0000000000..cc8365d5d4 --- /dev/null +++ b/tests/xml/grids.list @@ -0,0 +1,4 @@ +001 ocaf_std +002 ocaf_xml +003 xcaf_dxc +004 xcaf_xml diff --git a/tests/xml/ocaf_std/begin b/tests/xml/ocaf_std/begin new file mode 100755 index 0000000000..cf754c0912 --- /dev/null +++ b/tests/xml/ocaf_std/begin @@ -0,0 +1,10 @@ +set FileSuffix "std" + +# Create a new document and set UndoLimit +NewDocument D MDTV-Standard +UndoLimit D 100 + +# Open a transaction +NewCommand D + +set subgroup "ocaf_std" diff --git a/tests/xml/ocaf_std/cases.list b/tests/xml/ocaf_std/cases.list new file mode 100644 index 0000000000..860ef98ddb --- /dev/null +++ b/tests/xml/ocaf_std/cases.list @@ -0,0 +1,2 @@ +../data/ocaf + diff --git a/tests/xml/ocaf_xml/begin b/tests/xml/ocaf_xml/begin new file mode 100755 index 0000000000..ff0618f5bf --- /dev/null +++ b/tests/xml/ocaf_xml/begin @@ -0,0 +1,11 @@ +set SchemaFile [locate_data_file XmlOcaf.xsd] +set FileSuffix "xml" + +# Create a new document and set UndoLimit +NewDocument D XmlOcaf +UndoLimit D 100 + +# Open a transaction +NewCommand D + +set subgroup "ocaf_xml" diff --git a/tests/xml/ocaf_xml/cases.list b/tests/xml/ocaf_xml/cases.list new file mode 100644 index 0000000000..860ef98ddb --- /dev/null +++ b/tests/xml/ocaf_xml/cases.list @@ -0,0 +1,2 @@ +../data/ocaf + diff --git a/tests/xml/xcaf_dxc/begin b/tests/xml/xcaf_dxc/begin new file mode 100755 index 0000000000..6a76165c50 --- /dev/null +++ b/tests/xml/xcaf_dxc/begin @@ -0,0 +1,12 @@ +pload XDE + +set FileSuffix "dxc" + +# Create a new document and set UndoLimit +NewDocument D MDTV-XCAF +UndoLimit D 100 + +# Open a transaction +NewCommand D + +set subgroup "xcaf_dxc" diff --git a/tests/xml/xcaf_dxc/cases.list b/tests/xml/xcaf_dxc/cases.list new file mode 100644 index 0000000000..3978878c95 --- /dev/null +++ b/tests/xml/xcaf_dxc/cases.list @@ -0,0 +1,2 @@ +../data/xcaf + diff --git a/tests/xml/xcaf_xml/begin b/tests/xml/xcaf_xml/begin new file mode 100755 index 0000000000..b485d9f908 --- /dev/null +++ b/tests/xml/xcaf_xml/begin @@ -0,0 +1,13 @@ +set SchemaFile [locate_data_file XmlXcaf.xsd] + +pload XDE +set FileSuffix "xml" + +# Create a new document and set UndoLimit +NewDocument D XmlXCAF +UndoLimit D 100 + +# Open a transaction +NewCommand D + +set subgroup "xcaf_xml" diff --git a/tests/xml/xcaf_xml/cases.list b/tests/xml/xcaf_xml/cases.list new file mode 100644 index 0000000000..3978878c95 --- /dev/null +++ b/tests/xml/xcaf_xml/cases.list @@ -0,0 +1,2 @@ +../data/xcaf +