From f4e8c2f7992fd35e724c5acb918091f9dfad7772 Mon Sep 17 00:00:00 2001 From: Yu Feng Date: Wed, 2 Nov 2016 17:08:58 -0700 Subject: [PATCH] Add a test for float128 add in vala source code. This is to make sure vala does not try to do nasty things on operators for types it doesn't really know / care -- The Rank in CCode should have ensured this works. --- tests/numeric-test.vala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/numeric-test.vala b/tests/numeric-test.vala index aa8b524..a6bba69 100644 --- a/tests/numeric-test.vala +++ b/tests/numeric-test.vala @@ -39,6 +39,8 @@ public int main (string[] args) Test.add_func ("/float128", () => { float128 f = 12.5; + float128 g = 13.5; + assert (26 == (double) (f + g)); assert (12.5 == (double) f); assert ("1.096910e+00" == Numeric.Math.log10q (f).to_string ("%Qe")); assert ("1.189731e+4932" == float128.MAX.to_string ("%Qe"));