From d2d893b809d9ba219f761f300fb7801de0d39bb2 Mon Sep 17 00:00:00 2001 From: Roman Lygin Date: Tue, 25 Jun 2013 21:58:50 +0400 Subject: [PATCH] 0024045: Invalid test case for matrix-vector multiplication --- src/QABugs/QABugs_11.cxx | 3 +++ src/math/math_Matrix.cxx | 6 ------ src/math/math_Vector.cxx | 6 ------ tests/bugs/moddata_2/bug524 | 22 +++++++++++----------- 4 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/QABugs/QABugs_11.cxx b/src/QABugs/QABugs_11.cxx index 66ae18bd88..231ec0b9a4 100755 --- a/src/QABugs/QABugs_11.cxx +++ b/src/QABugs/QABugs_11.cxx @@ -1417,6 +1417,9 @@ static Standard_Integer OCC524 (Draw_Interpretor& di, Standard_Integer argc, con di << aSStream1; di<<"\n"; + if (Matrix.RowNumber() > 1) { + Matrix(Matrix.LowerRow() + 1, Matrix.LowerCol()) += 1.; + } Vector2.TMultiply(Vector, Matrix); //Vector2.Dump(cout); diff --git a/src/math/math_Matrix.cxx b/src/math/math_Matrix.cxx index 12934811f1..c135df38a5 100755 --- a/src/math/math_Matrix.cxx +++ b/src/math/math_Matrix.cxx @@ -16,12 +16,6 @@ // purpose or non-infringement. Please see the License for the specific terms // and conditions governing the rights and limitations under the License. -//#ifndef DEB -#define No_Standard_RangeError -#define No_Standard_OutOfRange -#define No_Standard_DimensionError -//#endif - #include #include diff --git a/src/math/math_Vector.cxx b/src/math/math_Vector.cxx index db465ebde2..c4229f4f79 100755 --- a/src/math/math_Vector.cxx +++ b/src/math/math_Vector.cxx @@ -16,12 +16,6 @@ // purpose or non-infringement. Please see the License for the specific terms // and conditions governing the rights and limitations under the License. -//#ifndef DEB -#define No_Standard_RangeError -#define No_Standard_OutOfRange -#define No_Standard_DimensionError -//#endif - #include #include diff --git a/tests/bugs/moddata_2/bug524 b/tests/bugs/moddata_2/bug524 index cb640524b2..65cd480afd 100755 --- a/tests/bugs/moddata_2/bug524 +++ b/tests/bugs/moddata_2/bug524 @@ -7,19 +7,19 @@ puts "" set LowerVector 1 -set UpperVector 9 +set UpperVector 6 set InitialValueVector 5 set LowerRowMatrix 1 set UpperRowMatrix 6 set LowerColMatrix 1 -set UpperColMatrix 3 +set UpperColMatrix 6 set InitialValueMatrix 4 set info_result [OCC524 ${LowerVector} ${UpperVector} ${InitialValueVector} ${LowerRowMatrix} ${UpperRowMatrix} ${LowerColMatrix} ${UpperColMatrix} ${InitialValueMatrix}] set ll [llength ${info_result}] -if {${ll} != 64} { +if {${ll} != 46} { puts "OCC524: Error" } else { regexp {math_Vector of Length = ([-0-9.+eE]+)} ${info_result} full Vector1Length @@ -33,11 +33,11 @@ if {${ll} != 64} { regexp {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector1_4 regexp {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector1_5 regexp {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector1_6 - regexp {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector1_7 - regexp {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector1_8 - regexp {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector1_9 + #regexp {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector1_7 + #regexp {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector1_8 + #regexp {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector1_9 - if {${Vector1_1}!=120. || ${Vector1_2}!=120. || ${Vector1_3}!=120. || ${Vector1_4}!=0. || ${Vector1_5}!=0. || ${Vector1_6}!=0. || ${Vector1_7}!=0. || ${Vector1_8}!= 0.|| ${Vector1_9}!=0.} { + if {${Vector1_1}!=120. || ${Vector1_2}!=120. || ${Vector1_3}!=120. || ${Vector1_4}!=120. || ${Vector1_5}!=120. || ${Vector1_6}!=120.} { puts "Error : OCC524" } else { regexp -all {math_Vector\(1\) = ([-0-9.+eE]+)} ${info_result} full Vector2_1 @@ -46,10 +46,10 @@ if {${ll} != 64} { regexp -all {math_Vector\(4\) = ([-0-9.+eE]+)} ${info_result} full Vector2_4 regexp -all {math_Vector\(5\) = ([-0-9.+eE]+)} ${info_result} full Vector2_5 regexp -all {math_Vector\(6\) = ([-0-9.+eE]+)} ${info_result} full Vector2_6 - regexp -all {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector2_7 - regexp -all {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector2_8 - regexp -all {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector2_9 - if {${Vector2_1}!=60. || ${Vector2_2}!=60. || ${Vector2_3}!=60. || ${Vector2_4}!=60. || ${Vector2_5}!=60. || ${Vector2_6}!=60. || ${Vector2_7}!=0. || ${Vector2_8}!= 0.|| ${Vector2_9}!=0.} { + #regexp -all {math_Vector\(7\) = ([-0-9.+eE]+)} ${info_result} full Vector2_7 + #regexp -all {math_Vector\(8\) = ([-0-9.+eE]+)} ${info_result} full Vector2_8 + #regexp -all {math_Vector\(9\) = ([-0-9.+eE]+)} ${info_result} full Vector2_9 + if {${Vector2_1}!=120. || ${Vector2_2}!=125. || ${Vector2_3}!=120. || ${Vector2_4}!=120. || ${Vector2_5}!=120. || ${Vector2_6}!=120.} { puts "OCC524: Error" } else { puts "OCC524: OK"