From 5edf160fe544c1b0b861e4b56a82940417571023 Mon Sep 17 00:00:00 2001 From: vro Date: Mon, 19 Sep 2016 14:38:25 +0300 Subject: [PATCH] Non-regression test for new OCAF attribute TDataStd_Mesh is improved a little. --- src/TKBinL/EXTERNLIB | 1 + tests/caf/basic/N1 | 21 +++++++++++++-------- tests/caf/basic/N2 | 42 ------------------------------------------ 3 files changed, 14 insertions(+), 50 deletions(-) delete mode 100644 tests/caf/basic/N2 diff --git a/src/TKBinL/EXTERNLIB b/src/TKBinL/EXTERNLIB index b39644fd46..e66b6abef4 100644 --- a/src/TKBinL/EXTERNLIB +++ b/src/TKBinL/EXTERNLIB @@ -1,3 +1,4 @@ TKCDF TKernel TKLCAF +TKMath \ No newline at end of file diff --git a/tests/caf/basic/N1 b/tests/caf/basic/N1 index 03b327b75a..0805edca79 100644 --- a/tests/caf/basic/N1 +++ b/tests/caf/basic/N1 @@ -10,29 +10,34 @@ puts "caf001-N1" # Make a sphere and produce triangulation -psphere s 100 -vdisplay s +box s 100 200 300 explode s f - -# Create a XML document -NewDocument D XmlXCAF +incmesh s_1 0.1 # Set mesh from the spherical face +NewCommand D SetMesh D 0:1 s_1 +NewCommand D + +# Test Undo/Redo. +Undo D +Redo D # Print the mesh data set dump1 [DumpMesh D 0:1] # Save document on disk. -SaveAs D "test.xml" +SaveAs D test.cbf # Close and open the document again. -Close D -Open test.xml DD +#Close D +Open test.cbf DD # Print mesh data set dump2 [DumpMesh DD 0:1] +Close DD + # Check data if { ${dump1}!=${dump2} } { puts "TDataStd_Mesh(XML) attribute: Error" diff --git a/tests/caf/basic/N2 b/tests/caf/basic/N2 deleted file mode 100644 index e2e91fa8f1..0000000000 --- a/tests/caf/basic/N2 +++ /dev/null @@ -1,42 +0,0 @@ -#INTERFACE CAF -# Basic attributes -# -# Testing attribute: TDataStd_Mesh -# -# Testing command: SetMesh -# Testing command: DumpMesh -# Test : Binary file format -# - -puts "caf001-N2" - -# Make a sphere and produce triangulation -psphere s 100 -vdisplay s -explode s f - -# Create a binary document -NewDocument D BinXCAF - -# Set mesh from the spherical face -SetMesh D 0:1 s_1 - -# Print the mesh data -set dump1 [DumpMesh D 0:1] - -# Save document on disk. -SaveAs D "test.xbf" - -# Close and open the document again. -Close D -Open test.xbf DD - -# Print mesh data -set dump2 [DumpMesh DD 0:1] - -# Check data -if { ${dump1}!=${dump2} } { - puts "TDataStd_Mesh(BIN) attribute: Error" - return -} -puts "TDataStd_Mesh(BIN) attribute: OK" -- 2.39.5