[gnumeric] sstest: more tests, less standard problems.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] sstest: more tests, less standard problems.
- Date: Wed, 28 Dec 2011 03:02:05 +0000 (UTC)
commit 1cc77303b14740db14552396c8547f759bd18253
Author: Morten Welinder <terra gnome org>
Date: Tue Dec 27 22:01:29 2011 -0500
sstest: more tests, less standard problems.
src/sstest.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/sstest.c b/src/sstest.c
index 37ebc93..711e750 100644
--- a/src/sstest.c
+++ b/src/sstest.c
@@ -336,20 +336,22 @@ test_nonascii_numbers (void)
res |= test_strtol_noconv (" -");
res |= test_strtol_noconv (" .00");
res |= test_strtol_noconv (" e0");
+ res |= test_strtol_noconv ("--0");
+ res |= test_strtol_noconv ("+-0");
+ res |= test_strtol_noconv ("+ 0");
+ res |= test_strtol_noconv ("- 0");
{
char buffer[4 * sizeof (long) + 2];
- sprintf (buffer, "%ld", LONG_MIN);
- buffer[strlen (buffer) - 1]++;
+ sprintf (buffer, "-%lu", 1 + (unsigned long)LONG_MIN);
res |= test_strtol_overflow (buffer, FALSE);
- buffer[strlen (buffer) - 2]++;
+ sprintf (buffer, "-%lu", 10 + (unsigned long)LONG_MIN);
res |= test_strtol_overflow (buffer, FALSE);
- sprintf (buffer, "%ld", LONG_MAX);
- buffer[strlen (buffer) - 1]++;
+ sprintf (buffer, "%lu", 1 + (unsigned long)LONG_MAX);
res |= test_strtol_overflow (buffer, TRUE);
- buffer[strlen (buffer) - 2]++;
+ sprintf (buffer, "%lu", 10 + (unsigned long)LONG_MAX);
res |= test_strtol_overflow (buffer, TRUE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]