1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0000670: Problem with the Print method.

Test for issue #670 corrected to avoid unpredictable behavior
This commit is contained in:
abv 2015-11-19 15:20:39 +03:00 committed by bugmaster
parent 95e05159d6
commit 8fcb8c0700
2 changed files with 13 additions and 11 deletions

View File

@ -1705,8 +1705,16 @@ static Standard_Integer OCC670 (Draw_Interpretor& di, Standard_Integer argc, con
di<<"Usage : " << argv[0] << "\n";
return -1;
}
TColStd_Array2OfInteger Array2OfInteger(1,1,1,1);
Array2OfInteger.SetValue(5,5,55);
// check that exception initialized without message string can be safely handled and printed
try {
Standard_OutOfRange::Raise();
}
catch (Standard_Failure) {
std::cout << "Caught successfully: ";
Standard_Failure::Caught()->Print (std::cout);
std::cout << endl;
}
return 0;
}

View File

@ -1,17 +1,11 @@
# OK: Exception appears and does not kill DRAWEXE (TEST COMPLETED)
puts "TODO OCC670 ALL: An exception was caught"
puts "TODO OCC670 ALL: \\*\\* Exception \\*\\*"
puts "========"
puts "OCC670"
puts "OCC670: Problem with the Print method."
puts "========"
puts ""
#########################
## Problem with the Print method.
#########################
pload QAcommands
catch { OCC670 }
# Check that exception is handled and does not kill DRAWEXE (TEST COMPLETED)
OCC670
puts "OCC670 OK"