Age | Commit message (Collapse) | Author |
|
Uses reallocarray() if available, otherwise checks for overflow itself,
if overflow is possible (i.e. in ILP32 & ILP64 environments, but not LP64
with 32-bit ints).
Includes unit tests and XtMallocArray() helper macro.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
https://docs.gtk.org/glib/testing.html warns against using g_assert()
in test cases, since it is a no-op when compiling with G_DISABLE_ASSERT.
The replacement calls also give more detailed messages on failures.
Raises the minimum required glib version for building unit tests
from 2.16 (released March 2008) to 2.40 (released March 2014) to
get support for g_assert_nonnull().
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Also adds a call to g_test_bug() for the one existing testcase
associated with a bug in a public bug tracker.
Otherwise this is mostly a placeholder for now, as no other tests
call g_test_bug() yet to report what bugs they test for.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Recent versions of automake deprecate the INCLUDES variable. The same
effect can be achieved by using AM_CPPFLAGS instead, which is also
automake's recommendation.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Expanded from original Sun test case for Solaris bug 4163152.
Verified that with commit 16d9941f3aa38 reverted, this test case
fails on amd64, with it present, this test case passes.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|
|
Only two simple test cases to start with:
- compares the results of snprintf of a short string to a static buffer
with the new buffer returned by XtAsprintf.
- compare the results of using XtAsprintf to replicate a portion of a
very long string with the original string.
Uses malloc debugging flags for various platforms to try to catch errors
with uninitialized memory (such as the recently fixed failure to terminate
the string).
Requires xorg-macros 1.13 for XORG_ENABLE_UNIT_TESTS and XORG_WITH_GLIB.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
|