>
> That should be done in unit testing, wherever possible. Some
> conditions we simply can't test, such as *succeeding* in allocating a
> memory block of a size comparable to PTRDIFF_MAX because such a block
> is not architecturally possible (on 64-bit machines). As a rule of
> thumb for test writers: always test your boundary conditions.

The problem with testing UB cases is that the program can do anything, which 
means a runtime unit test could succeed even though e.g. I hit a signed integer 
overflow.
That's why I would consider compile-time tests for such cases.

Kind regards

Robert
________________________________

This message and any attachments are solely for the use of the intended 
recipients. They may contain privileged and/or confidential information or 
other information protected from disclosure. If you are not an intended 
recipient, you are hereby notified that you received this email in error and 
that any review, dissemination, distribution or copying of this email and any 
attachment is strictly prohibited. If you have received this email in error, 
please contact the sender and delete the message and any attachment from your 
system.

ANDRITZ HYDRO GmbH


Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation

Firmensitz/ Registered seat: Wien

Firmenbuchgericht/ Court of registry: Handelsgericht Wien

Firmenbuchnummer/ Company registration: FN 61833 g

DVR: 0605077

UID-Nr.: ATU14756806


Thank You
________________________________
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to