[pypy-commit] pypy default: added test to check if cast single float to bool is working properly aswell

plan_rich noreply at buildbot.pypy.org
Wed Jul 29 12:15:36 CEST 2015


Author: Richard Plangger <rich at pasra.at>
Branch: 
Changeset: r78705:d221a50d7898
Date: 2015-07-29 12:15 +0200
http://bitbucket.org/pypy/pypy/changeset/d221a50d7898/

Log:	added test to check if cast single float to bool is working properly
	aswell

diff --git a/rpython/jit/codewriter/test/test_flatten.py b/rpython/jit/codewriter/test/test_flatten.py
--- a/rpython/jit/codewriter/test/test_flatten.py
+++ b/rpython/jit/codewriter/test/test_flatten.py
@@ -874,6 +874,11 @@
             float_ne %f0, $0.0 -> %i0
             int_return %i0
         """, transform=True)
+        self.encoding_test(f, [rffi.cast(lltype.SingleFloat, 0.5)], """
+            cast_singlefloat_to_float %i0 -> %f0
+            float_ne %f0, $0.0 -> %i1
+            int_return %i1
+        """, transform=True)
 
         # Casts to lltype.SingleFloat
         def g(n):


More information about the pypy-commit mailing list