summaryrefslogtreecommitdiff
path: root/test-suite/standalone/test-conversion.c
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/standalone/test-conversion.c')
-rw-r--r--test-suite/standalone/test-conversion.c281
1 files changed, 141 insertions, 140 deletions
diff --git a/test-suite/standalone/test-conversion.c b/test-suite/standalone/test-conversion.c
index 700e5b3d4..6e3ec6cdd 100644
--- a/test-suite/standalone/test-conversion.c
+++ b/test-suite/standalone/test-conversion.c
@@ -1,20 +1,21 @@
-/* Copyright (C) 1999,2000,2001,2003,2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 3 of
- * the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- * 02110-1301 USA
- */
+/* Copyright 1999-2001,2003-2004,2006-2010,2018
+ Free Software Foundation, Inc.
+
+ This file is part of Guile.
+
+ Guile is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Guile is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+ License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with Guile. If not, see
+ <https://www.gnu.org/licenses/>. */
#if HAVE_CONFIG_H
# include <config.h>
@@ -42,7 +43,7 @@
static void
-test_1 (const char *str, scm_t_intmax min, scm_t_intmax max,
+test_1 (const char *str, intmax_t min, intmax_t max,
int result)
{
int r = scm_is_signed_integer (scm_c_eval_string (str), min, max);
@@ -59,57 +60,57 @@ static void
test_is_signed_integer ()
{
test_1 ("'foo",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0);
test_1 ("3.0",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0);
test_1 ("(inexact->exact 3.0)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("3.5",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0);
test_1 ("most-positive-fixnum",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("(+ most-positive-fixnum 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("most-negative-fixnum",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("(- most-negative-fixnum 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
- if (sizeof (scm_t_intmax) == 8)
+ if (sizeof (intmax_t) == 8)
{
test_1 ("(- (expt 2 63) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("(expt 2 63)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0);
test_1 ("(- (expt 2 63))",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("(- (- (expt 2 63)) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0);
}
- else if (sizeof (scm_t_intmax) == 4)
+ else if (sizeof (intmax_t) == 4)
{
test_1 ("(- (expt 2 31) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("(expt 2 31)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0);
test_1 ("(- (expt 2 31))",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
1);
test_1 ("(- (- (expt 2 31)) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0);
}
else
@@ -128,7 +129,7 @@ test_is_signed_integer ()
}
static void
-test_2 (const char *str, scm_t_uintmax min, scm_t_uintmax max,
+test_2 (const char *str, uintmax_t min, uintmax_t max,
int result)
{
int r = scm_is_unsigned_integer (scm_c_eval_string (str), min, max);
@@ -145,45 +146,45 @@ static void
test_is_unsigned_integer ()
{
test_2 ("'foo",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0);
test_2 ("3.0",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0);
test_2 ("(inexact->exact 3.0)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
1);
test_2 ("3.5",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0);
test_2 ("most-positive-fixnum",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
1);
test_2 ("(+ most-positive-fixnum 1)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
1);
test_2 ("most-negative-fixnum",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0);
test_2 ("(- most-negative-fixnum 1)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0);
- if (sizeof (scm_t_intmax) == 8)
+ if (sizeof (intmax_t) == 8)
{
test_2 ("(- (expt 2 64) 1)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
1);
test_2 ("(expt 2 64)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0);
}
- else if (sizeof (scm_t_intmax) == 4)
+ else if (sizeof (intmax_t) == 4)
{
test_2 ("(- (expt 2 32) 1)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
1);
test_2 ("(expt 2 32)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0);
}
else
@@ -203,8 +204,8 @@ test_is_unsigned_integer ()
typedef struct {
SCM val;
- scm_t_intmax min, max;
- scm_t_intmax result;
+ intmax_t min, max;
+ intmax_t result;
} to_signed_data;
static SCM
@@ -240,8 +241,8 @@ to_signed_integer_body (void *data)
}
static void
-test_3 (const char *str, scm_t_intmax min, scm_t_intmax max,
- scm_t_intmax result, int range_error, int type_error)
+test_3 (const char *str, intmax_t min, intmax_t max,
+ intmax_t result, int range_error, int type_error)
{
to_signed_data data;
data.val = scm_c_eval_string (str);
@@ -294,13 +295,13 @@ static void
test_to_signed_integer ()
{
test_3 ("'foo",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0, 0, 1);
test_3 ("3.5",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0, 0, 1);
test_3 ("12",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
12, 0, 0);
test_3 ("1000",
-999, 999,
@@ -309,51 +310,51 @@ test_to_signed_integer ()
-999, 999,
0, 1, 0);
test_3 ("most-positive-fixnum",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
SCM_MOST_POSITIVE_FIXNUM, 0, 0);
test_3 ("most-negative-fixnum",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
SCM_MOST_NEGATIVE_FIXNUM, 0, 0);
test_3 ("(+ most-positive-fixnum 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
SCM_MOST_POSITIVE_FIXNUM+1, 0, 0);
test_3 ("(- most-negative-fixnum 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
SCM_MOST_NEGATIVE_FIXNUM-1, 0, 0);
- if (sizeof (scm_t_intmax) == 8)
+ if (sizeof (intmax_t) == 8)
{
test_3 ("(- (expt 2 63) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
- SCM_T_INTMAX_MAX, 0, 0);
+ INTMAX_MIN, INTMAX_MAX,
+ INTMAX_MAX, 0, 0);
test_3 ("(+ (- (expt 2 63)) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
- SCM_T_INTMAX_MIN+1, 0, 0);
+ INTMAX_MIN, INTMAX_MAX,
+ INTMAX_MIN+1, 0, 0);
test_3 ("(- (expt 2 63))",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
- SCM_T_INTMAX_MIN, 0, 0);
+ INTMAX_MIN, INTMAX_MAX,
+ INTMAX_MIN, 0, 0);
test_3 ("(expt 2 63)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0, 1, 0);
test_3 ("(- (- (expt 2 63)) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0, 1, 0);
}
- else if (sizeof (scm_t_intmax) == 4)
+ else if (sizeof (intmax_t) == 4)
{
test_3 ("(- (expt 2 31) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
- SCM_T_INTMAX_MAX, 0, 0);
+ INTMAX_MIN, INTMAX_MAX,
+ INTMAX_MAX, 0, 0);
test_3 ("(+ (- (expt 2 31)) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
- SCM_T_INTMAX_MIN+1, 0, 0);
+ INTMAX_MIN, INTMAX_MAX,
+ INTMAX_MIN+1, 0, 0);
test_3 ("(- (expt 2 31))",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
- SCM_T_INTMAX_MIN, 0, 0);
+ INTMAX_MIN, INTMAX_MAX,
+ INTMAX_MIN, 0, 0);
test_3 ("(expt 2 31)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0, 1, 0);
test_3 ("(- (- (expt 2 31)) 1)",
- SCM_T_INTMAX_MIN, SCM_T_INTMAX_MAX,
+ INTMAX_MIN, INTMAX_MAX,
0, 1, 0);
}
else
@@ -362,8 +363,8 @@ test_to_signed_integer ()
typedef struct {
SCM val;
- scm_t_uintmax min, max;
- scm_t_uintmax result;
+ uintmax_t min, max;
+ uintmax_t result;
} to_unsigned_data;
static SCM
@@ -375,8 +376,8 @@ to_unsigned_integer_body (void *data)
}
static void
-test_4 (const char *str, scm_t_uintmax min, scm_t_uintmax max,
- scm_t_uintmax result, int range_error, int type_error)
+test_4 (const char *str, uintmax_t min, uintmax_t max,
+ uintmax_t result, int range_error, int type_error)
{
to_unsigned_data data;
data.val = scm_c_eval_string (str);
@@ -429,39 +430,39 @@ static void
test_to_unsigned_integer ()
{
test_4 ("'foo",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0, 0, 1);
test_4 ("3.5",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0, 0, 1);
test_4 ("12",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
12, 0, 0);
test_4 ("1000",
0, 999,
0, 1, 0);
test_4 ("most-positive-fixnum",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
SCM_MOST_POSITIVE_FIXNUM, 0, 0);
test_4 ("(+ most-positive-fixnum 1)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
SCM_MOST_POSITIVE_FIXNUM+1, 0, 0);
- if (sizeof (scm_t_intmax) == 8)
+ if (sizeof (intmax_t) == 8)
{
test_4 ("(- (expt 2 64) 1)",
- 0, SCM_T_UINTMAX_MAX,
- SCM_T_UINTMAX_MAX, 0, 0);
+ 0, UINTMAX_MAX,
+ UINTMAX_MAX, 0, 0);
test_4 ("(expt 2 64)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0, 1, 0);
}
- else if (sizeof (scm_t_intmax) == 4)
+ else if (sizeof (intmax_t) == 4)
{
test_4 ("(- (expt 2 32) 1)",
- 0, SCM_T_UINTMAX_MAX,
- SCM_T_UINTMAX_MAX, 0, 0);
+ 0, UINTMAX_MAX,
+ UINTMAX_MAX, 0, 0);
test_4 ("(expt 2 32)",
- 0, SCM_T_UINTMAX_MAX,
+ 0, UINTMAX_MAX,
0, 1, 0);
}
else
@@ -469,7 +470,7 @@ test_to_unsigned_integer ()
}
static void
-test_5 (scm_t_intmax val, const char *result)
+test_5 (intmax_t val, const char *result)
{
SCM res = scm_c_eval_string (result);
if (scm_is_false (scm_equal_p (scm_from_signed_integer (val), res)))
@@ -484,15 +485,15 @@ static void
test_from_signed_integer ()
{
test_5 (12, "12");
- if (sizeof (scm_t_intmax) == 8)
+ if (sizeof (intmax_t) == 8)
{
- test_5 (SCM_T_INTMAX_MAX, "(- (expt 2 63) 1)");
- test_5 (SCM_T_INTMAX_MIN, "(- (expt 2 63))");
+ test_5 (INTMAX_MAX, "(- (expt 2 63) 1)");
+ test_5 (INTMAX_MIN, "(- (expt 2 63))");
}
- else if (sizeof (scm_t_intmax) == 4)
+ else if (sizeof (intmax_t) == 4)
{
- test_5 (SCM_T_INTMAX_MAX, "(- (expt 2 31) 1)");
- test_5 (SCM_T_INTMAX_MIN, "(- (expt 2 31))");
+ test_5 (INTMAX_MAX, "(- (expt 2 31) 1)");
+ test_5 (INTMAX_MIN, "(- (expt 2 31))");
}
test_5 (SCM_MOST_POSITIVE_FIXNUM, "most-positive-fixnum");
test_5 (SCM_MOST_NEGATIVE_FIXNUM, "most-negative-fixnum");
@@ -501,7 +502,7 @@ test_from_signed_integer ()
}
static void
-test_6 (scm_t_uintmax val, const char *result)
+test_6 (uintmax_t val, const char *result)
{
SCM res = scm_c_eval_string (result);
if (scm_is_false (scm_equal_p (scm_from_unsigned_integer (val), res)))
@@ -517,20 +518,20 @@ static void
test_from_unsigned_integer ()
{
test_6 (12, "12");
- if (sizeof (scm_t_intmax) == 8)
+ if (sizeof (intmax_t) == 8)
{
- test_6 (SCM_T_UINTMAX_MAX, "(- (expt 2 64) 1)");
+ test_6 (UINTMAX_MAX, "(- (expt 2 64) 1)");
}
- else if (sizeof (scm_t_intmax) == 4)
+ else if (sizeof (intmax_t) == 4)
{
- test_6 (SCM_T_UINTMAX_MAX, "(- (expt 2 32) 1)");
+ test_6 (UINTMAX_MAX, "(- (expt 2 32) 1)");
}
test_6 (SCM_MOST_POSITIVE_FIXNUM, "most-positive-fixnum");
test_6 (SCM_MOST_POSITIVE_FIXNUM+1, "(+ most-positive-fixnum 1)");
}
static void
-test_7s (SCM n, scm_t_intmax c_n, const char *result, const char *func)
+test_7s (SCM n, intmax_t c_n, const char *result, const char *func)
{
SCM r = scm_c_eval_string (result);
@@ -544,7 +545,7 @@ test_7s (SCM n, scm_t_intmax c_n, const char *result, const char *func)
#define TEST_7S(func,arg,res) test_7s (func(arg), arg, res, #func)
static void
-test_7u (SCM n, scm_t_uintmax c_n, const char *result, const char *func)
+test_7u (SCM n, uintmax_t c_n, const char *result, const char *func)
{
SCM r = scm_c_eval_string (result);
@@ -559,8 +560,8 @@ test_7u (SCM n, scm_t_uintmax c_n, const char *result, const char *func)
typedef struct {
SCM val;
- scm_t_intmax (*func) (SCM);
- scm_t_intmax result;
+ intmax_t (*func) (SCM);
+ intmax_t result;
} to_signed_func_data;
static SCM
@@ -572,8 +573,8 @@ to_signed_func_body (void *data)
}
static void
-test_8s (const char *str, scm_t_intmax (*func) (SCM), const char *func_name,
- scm_t_intmax result, int range_error, int type_error)
+test_8s (const char *str, intmax_t (*func) (SCM), const char *func_name,
+ intmax_t result, int range_error, int type_error)
{
to_signed_func_data data;
data.val = scm_c_eval_string (str);
@@ -617,8 +618,8 @@ test_8s (const char *str, scm_t_intmax (*func) (SCM), const char *func_name,
typedef struct {
SCM val;
- scm_t_uintmax (*func) (SCM);
- scm_t_uintmax result;
+ uintmax_t (*func) (SCM);
+ uintmax_t result;
} to_unsigned_func_data;
static SCM
@@ -630,8 +631,8 @@ to_unsigned_func_body (void *data)
}
static void
-test_8u (const char *str, scm_t_uintmax (*func) (SCM), const char *func_name,
- scm_t_uintmax result, int range_error, int type_error)
+test_8u (const char *str, uintmax_t (*func) (SCM), const char *func_name,
+ uintmax_t result, int range_error, int type_error)
{
to_unsigned_func_data data;
data.val = scm_c_eval_string (str);
@@ -678,8 +679,8 @@ test_8u (const char *str, scm_t_uintmax (*func) (SCM), const char *func_name,
need to give them a common return type.
*/
-#define DEFSTST(f) static scm_t_intmax tst_##f (SCM x) { return f(x); }
-#define DEFUTST(f) static scm_t_uintmax tst_##f (SCM x) { return f(x); }
+#define DEFSTST(f) static intmax_t tst_##f (SCM x) { return f(x); }
+#define DEFUTST(f) static uintmax_t tst_##f (SCM x) { return f(x); }
DEFSTST (scm_to_schar)
DEFUTST (scm_to_uchar)
@@ -739,14 +740,14 @@ test_int_sizes ()
TEST_7S (scm_from_int16, 32768, "-32768");
TEST_7U (scm_from_uint16, 65535, "65535");
- TEST_7S (scm_from_int32, SCM_T_INT32_MIN, "-2147483648");
- TEST_7S (scm_from_int32, SCM_T_INT32_MAX, "2147483647");
- TEST_7S (scm_from_int32, SCM_T_INT32_MAX+1LL, "-2147483648");
- TEST_7U (scm_from_uint32, SCM_T_UINT32_MAX, "4294967295");
+ TEST_7S (scm_from_int32, INT32_MIN, "-2147483648");
+ TEST_7S (scm_from_int32, INT32_MAX, "2147483647");
+ TEST_7S (scm_from_int32, INT32_MAX+1LL, "-2147483648");
+ TEST_7U (scm_from_uint32, UINT32_MAX, "4294967295");
- TEST_7S (scm_from_int64, SCM_T_INT64_MIN, "-9223372036854775808");
- TEST_7S (scm_from_int64, SCM_T_INT64_MAX, "9223372036854775807");
- TEST_7U (scm_from_uint64, SCM_T_UINT64_MAX, "18446744073709551615");
+ TEST_7S (scm_from_int64, INT64_MIN, "-9223372036854775808");
+ TEST_7S (scm_from_int64, INT64_MAX, "9223372036854775807");
+ TEST_7U (scm_from_uint64, UINT64_MAX, "18446744073709551615");
TEST_8S ("91", scm_to_schar, 91, 0, 0);
TEST_8U ("91", scm_to_uchar, 91, 0, 0);
@@ -764,38 +765,38 @@ test_int_sizes ()
TEST_8U ("911", scm_to_size_t, 911, 0, 0);
TEST_8S ("911", scm_to_ssize_t, 911, 0, 0);
- TEST_8S ("-128", scm_to_int8, SCM_T_INT8_MIN, 0, 0);
- TEST_8S ("127", scm_to_int8, SCM_T_INT8_MAX, 0, 0);
+ TEST_8S ("-128", scm_to_int8, INT8_MIN, 0, 0);
+ TEST_8S ("127", scm_to_int8, INT8_MAX, 0, 0);
TEST_8S ("128", scm_to_int8, 0, 1, 0);
TEST_8S ("#f", scm_to_int8, 0, 0, 1);
- TEST_8U ("255", scm_to_uint8, SCM_T_UINT8_MAX, 0, 0);
+ TEST_8U ("255", scm_to_uint8, UINT8_MAX, 0, 0);
TEST_8U ("256", scm_to_uint8, 0, 1, 0);
TEST_8U ("-1", scm_to_uint8, 0, 1, 0);
TEST_8U ("#f", scm_to_uint8, 0, 0, 1);
- TEST_8S ("-32768", scm_to_int16, SCM_T_INT16_MIN, 0, 0);
- TEST_8S ("32767", scm_to_int16, SCM_T_INT16_MAX, 0, 0);
+ TEST_8S ("-32768", scm_to_int16, INT16_MIN, 0, 0);
+ TEST_8S ("32767", scm_to_int16, INT16_MAX, 0, 0);
TEST_8S ("32768", scm_to_int16, 0, 1, 0);
TEST_8S ("#f", scm_to_int16, 0, 0, 1);
- TEST_8U ("65535", scm_to_uint16, SCM_T_UINT16_MAX, 0, 0);
+ TEST_8U ("65535", scm_to_uint16, UINT16_MAX, 0, 0);
TEST_8U ("65536", scm_to_uint16, 0, 1, 0);
TEST_8U ("-1", scm_to_uint16, 0, 1, 0);
TEST_8U ("#f", scm_to_uint16, 0, 0, 1);
- TEST_8S ("-2147483648", scm_to_int32, SCM_T_INT32_MIN, 0, 0);
- TEST_8S ("2147483647", scm_to_int32, SCM_T_INT32_MAX, 0, 0);
+ TEST_8S ("-2147483648", scm_to_int32, INT32_MIN, 0, 0);
+ TEST_8S ("2147483647", scm_to_int32, INT32_MAX, 0, 0);
TEST_8S ("2147483648", scm_to_int32, 0, 1, 0);
TEST_8S ("#f", scm_to_int32, 0, 0, 1);
- TEST_8U ("4294967295", scm_to_uint32, SCM_T_UINT32_MAX, 0, 0);
+ TEST_8U ("4294967295", scm_to_uint32, UINT32_MAX, 0, 0);
TEST_8U ("4294967296", scm_to_uint32, 0, 1, 0);
TEST_8U ("-1", scm_to_uint32, 0, 1, 0);
TEST_8U ("#f", scm_to_uint32, 0, 0, 1);
- TEST_8S ("-9223372036854775808", scm_to_int64, SCM_T_INT64_MIN, 0, 0);
- TEST_8S ("9223372036854775807", scm_to_int64, SCM_T_INT64_MAX, 0, 0);
+ TEST_8S ("-9223372036854775808", scm_to_int64, INT64_MIN, 0, 0);
+ TEST_8S ("9223372036854775807", scm_to_int64, INT64_MAX, 0, 0);
TEST_8S ("9223372036854775808", scm_to_int64, 0, 1, 0);
TEST_8S ("#f", scm_to_int64, 0, 0, 1);
- TEST_8U ("18446744073709551615", scm_to_uint64, SCM_T_UINT64_MAX, 0, 0);
+ TEST_8U ("18446744073709551615", scm_to_uint64, UINT64_MAX, 0, 0);
TEST_8U ("18446744073709551616", scm_to_uint64, 0, 1, 0);
TEST_8U ("-1", scm_to_uint64, 0, 1, 0);
TEST_8U ("#f", scm_to_uint64, 0, 0, 1);