From ea0a0dde9e99daef460d0069cc9fd03bd789038e Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 17 Jan 2006 00:38:10 +0000 Subject: [PATCH] fix example for new double->long long casting rule git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8471 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/python/overload_simple_cast_runme.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Examples/test-suite/python/overload_simple_cast_runme.py b/Examples/test-suite/python/overload_simple_cast_runme.py index 1312e5a38..95fd57aa4 100644 --- a/Examples/test-suite/python/overload_simple_cast_runme.py +++ b/Examples/test-suite/python/overload_simple_cast_runme.py @@ -161,7 +161,7 @@ if s.type != "void *": # unsigned long long ullmax = 9223372036854775807 #0xffffffffffffffff -ullmaxd = 9223372036854775807.0 +ullmaxd = 922337203685477580.0 ullmin = 0 ullmind = 0.0 if ull(ullmin) != ullmin: @@ -175,9 +175,10 @@ if ull(ullmaxd) != ullmaxd: # long long llmax = 9223372036854775807 #0x7fffffffffffffff -llmaxd = 9223372036854775807.0 llmin = -9223372036854775808 -llmind = -9223372036854775808.0 +# these are near the largest floats we can still convert into long long +llmaxd = 922337203685477580.0 +llmind = -922337203685477580.0 if ll(llmin) != llmin: raise runtimeerror, "ll(llmin)" if ll(llmax) != llmax: