return 0;
}
+#include <ExprIntrp_GenExp.hxx>
+Standard_Integer CR23403 (Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
+{
+
+ if (argc != 2) {
+ di << "Usage : " << argv[0] << " string\n";
+ return 1;
+ }
+
+ Standard_CString aString = argv[1];
+ Handle(ExprIntrp_GenExp) myExpr = ExprIntrp_GenExp::Create();
+ try {
+ OCC_CATCH_SIGNALS
+ myExpr->Process( aString );
+ }
+ catch(Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ di << "Exception : " << aFail->GetMessageString() << "\n";
+ }
+
+ return 0;
+}
+
void QABugs::Commands_11(Draw_Interpretor& theCommands) {
const char *group = "QABugs";
theCommands.Add("bcarray", "bcarray", __FILE__, bcarray, group);
theCommands.Add("OCC22762", "OCC22762 x1 y1 z1 x2 y2 z3", __FILE__, OCC22762, group);
theCommands.Add("OCC22558", "OCC22558 x_vec y_vec z_vec x_dir y_dir z_dit x_pnt y_pnt z_pnt", __FILE__, OCC22558, group);
+ theCommands.Add("CR23403", "CR23403 string", __FILE__, CR23403, group);
return;
}
#######################################################################
pload QAcommands
-set R_check 0.45098000764846802
-set G_check 1
-set B_check 0.066666000000000003
+set r_1 0.4
+set r_2 0.5
+set g_1 0.9
+set g_2 1
+set b_1 0
+set b_2 0.1
set x1 128
set y1 235
box result 100 100 100
regexp {GREEN +: +([-0-9.+eE]+)} $color full gr
regexp {BLUE +: +([-0-9.+eE]+)} $color full bl
-if { $rd != $R_check || $gr != $G_check || $bl != $B_check} {
+set red_status 0
+if { $rd < $r_1 || $rd > $r_2 } {
+ set red_status 1
+} else {
+ set red_status 0
+}
+
+set green_status 0
+if { $gr < $g_1 || $gr > $g_2 } {
+ set green_status 1
+} else {
+ set green_status 0
+}
+
+set blue_status 0
+if { $bl < $b_1 || $bl > $b_2 } {
+ set blue_status 1
+} else {
+ set blue_status 0
+}
+
+if { $red_status != 0 || $green_status != 0 || $blue_status != 0 } {
puts "Error : color are not equal"
puts "Error : QA command QAGetPixelColor doesn't work properly"
}
--- /dev/null
+#######################################################################
+# Crash when parsing an expression with lexical error
+#######################################################################
+pload QAcommands
+
+set result [CR23403 \t]
+set length [llength ${result}]
+
+puts ""
+if { ${length} != 0 } {
+ puts "Error : parsing is incorrect"
+}
\ No newline at end of file