« Previous | Next » 

Revision 02c068c3

ID02c068c3ae8ec2954ea03de61d6627c555d88bff

Added by Pierre Riteau over 14 years ago

Fix and improve qint_from_int64_test

Use a long long integer constant to fix a compilation error (integer
constant is too large for 'long' type).

Use a better value for testing, as -1 makes the test pass even if
qi->value is of type uint32_t, float or double. This was suggested by
Reimar Döffinger <>.

Also, make the test fail when qi->value is of type double or float by
casting qi->value to int64_t, to avoid value being promoted to the type
of qi->value.

Signed-off-by: Pierre Riteau <>
Acked-by: Luiz Capitulino <>
Signed-off-by: Aurelien Jarno <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences