[vala/staging] tests: Make (u)int.try_parse() tests more 32bit friendly



commit bacd14707139211c7bb17ac3ff185962cfc0d57a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Oct 21 21:22:17 2019 +0200

    tests: Make (u)int.try_parse() tests more 32bit friendly

 tests/basic-types/integers.vala | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/basic-types/integers.vala b/tests/basic-types/integers.vala
index 08e3d0d8d..547120030 100644
--- a/tests/basic-types/integers.vala
+++ b/tests/basic-types/integers.vala
@@ -95,7 +95,7 @@ void test_int () {
        int.try_parse (s, out i, out unparsed);
        assert (i == int.MIN);
        assert (unparsed == "m");
-       s = "%lim".printf (long.MAX);
+       s = "%um".printf (uint.MAX);
        assert (!int.try_parse (s, out i));
 
        s = "%lim".printf (long.MIN);
@@ -111,7 +111,7 @@ void test_int () {
        uint.try_parse (s, out u, out unparsed);
        assert (u == uint.MAX);
        assert (unparsed == "m");
-       s = "%lum".printf (ulong.MAX);
+       s = "%im".printf (int.MIN);
        assert (!uint.try_parse (s, out u));
 
        s = "%lum".printf (ulong.MAX);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]