| Summary: | Expecting an exception when divide Float or Smallfloat by zero | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Kathy Carroll <carrollk> |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeffdouglas |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
fixed verified with build 201110241434 & closed |
RBD throws a Runtime exception in this case. In EDT all other number types throw an JavaObjectException program driver type BasicProgram {} function main() testDivisionFloat(); testDivisionSmallFloat(); end function testDivisionFloat() variation string = "Float variable / 0 "; failDetails string; float1 float = 2.539E7; floatActual float; zero float = 0; try floatActual = float1 / zero; failDetails = variation + " no exception "; syslib.writestdout("failed " + failDetails); onException (expect JavaObjectException) failDetails = "OK exceptionType " + expect.exceptionType; syslib.writestdout(failDetails); onException (wrong AnyException) failDetails = variation + " wrong exception "; syslib.writestdout("failed " + failDetails); end end function testDivisionSmallFloat() variation string = "SmallFloat variable / 0 "; failDetails string; smallFloat1 smallFloat = 2.539E7; zero smallFloat = 0; floatActual smallFloat; try floatActual = smallFloat1 / zero; failDetails = variation + " no exception "; syslib.writestdout("failed " + failDetails); onException (expect JavaObjectException) failDetails = "OK exceptionType " + expect.exceptionType; syslib.writestdout(failDetails); onException (wrong AnyException) failDetails = variation + " wrong exception "; syslib.writestdout("failed " + failDetails); end end end