aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/test
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-09-21 18:11:28 +0200
committermarha <marha@users.sourceforge.net>2014-09-21 18:11:28 +0200
commit438af0c7d4bf60b408b259c88205ff2193195466 (patch)
tree46fd6465cb7431f64a3cb475a40587a261983af4 /xorg-server/test
parentd0f70707dde032e662dbd5bc70df6ac915403abe (diff)
downloadvcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.tar.gz
vcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.tar.bz2
vcxsrv-438af0c7d4bf60b408b259c88205ff2193195466.zip
libxtrans xkeyboard-config xserver mesa plink glproto git update 21 Sep 2014
plink revision 10233 xserver commit 28337cb14e4347e1dd7936c5393a22e042866687 xkeyboard-config commit 48e1c0b351b6711edc0f167cbb81e4424b75291a glproto commit bd3d751e1eb17efb39f65093271bb4ac071aa9e0 libxtrans commit fb7f198c88e97d22c8c89e76e9cd06b2b2720a96 mesa commit 4eb2bbefd2bf0359aff7ebbb8e931a1c7833606f
Diffstat (limited to 'xorg-server/test')
-rw-r--r--xorg-server/test/Makefile.am5
-rw-r--r--xorg-server/test/list.c24
-rw-r--r--xorg-server/test/signal-logging.c7
3 files changed, 20 insertions, 16 deletions
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am
index 32edc7a3b..83442767a 100644
--- a/xorg-server/test/Makefile.am
+++ b/xorg-server/test/Makefile.am
@@ -5,7 +5,10 @@ if XORG
# Tests that require at least some DDX functions in order to fully link
# For now, requires xf86 ddx, could be adjusted to use another
SUBDIRS += xi2
-noinst_PROGRAMS += xkb input xtest misc fixes xfree86 hashtabletest os signal-logging touch
+noinst_PROGRAMS += xkb input xtest misc fixes xfree86 os signal-logging touch
+if RES
+noinst_PROGRAMS += hashtabletest
+endif
endif
check_LTLIBRARIES = libxservertest.la
diff --git a/xorg-server/test/list.c b/xorg-server/test/list.c
index f9f54ee4e..28d9609ef 100644
--- a/xorg-server/test/list.c
+++ b/xorg-server/test/list.c
@@ -249,15 +249,15 @@ test_nt_list_append(void)
/* Test using nt_list_next */
for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) {
- assert(item->a = i);
- assert(item->b = i * 2);
+ assert(item->a == i);
+ assert(item->b == i * 2);
}
/* Test using nt_list_for_each_entry */
i = 1;
nt_list_for_each_entry(item, foo, next) {
- assert(item->a = i);
- assert(item->b = i * 2);
+ assert(item->a == i);
+ assert(item->b == i * 2);
i++;
}
assert(i == 11);
@@ -270,11 +270,11 @@ test_nt_list_insert(void)
struct foo *foo = calloc(10, sizeof(struct foo));
struct foo *item;
- foo->a = 10;
- foo->b = 20;
+ foo->a = 1;
+ foo->b = 2;
nt_list_init(foo, next);
- for (item = &foo[1], i = 9; i > 0; i--, item++) {
+ for (item = &foo[1], i = 10; i > 1; i--, item++) {
item->a = i;
item->b = i * 2;
nt_list_init(item, next);
@@ -282,16 +282,16 @@ test_nt_list_insert(void)
}
/* Test using nt_list_next */
- for (item = foo, i = 10; i > 0; i--, item = nt_list_next(item, next)) {
- assert(item->a = i);
- assert(item->b = i * 2);
+ for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) {
+ assert(item->a == i);
+ assert(item->b == i * 2);
}
/* Test using nt_list_for_each_entry */
i = 1;
nt_list_for_each_entry(item, foo, next) {
- assert(item->a = i);
- assert(item->b = i * 2);
+ assert(item->a == i);
+ assert(item->b == i * 2);
i++;
}
assert(i == 11);
diff --git a/xorg-server/test/signal-logging.c b/xorg-server/test/signal-logging.c
index 432012195..3d2d04801 100644
--- a/xorg-server/test/signal-logging.c
+++ b/xorg-server/test/signal-logging.c
@@ -113,12 +113,13 @@ double float_tests[] = { 0, 5, 0.1, 0.01, 5.2342, 10.2301,
-1, -2.00, -0.6023, -1203.30
};
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Woverflow"
+
static void
number_formatting(void)
{
int i;
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Woverflow"
long unsigned int unsigned_tests[] = { 0,/* Zero */
5, /* Single digit number */
12, /* Two digit decimal number */
@@ -141,7 +142,6 @@ number_formatting(void)
-0x15D027BF211B37A, /* Large > 32 bit number */
-0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */
} ;
-#pragma GCC diagnostic pop
for (i = 0; i < sizeof(unsigned_tests) / sizeof(unsigned_tests[0]); i++)
assert(check_number_format_test(unsigned_tests[i]));
@@ -152,6 +152,7 @@ number_formatting(void)
for (i = 0; i < sizeof(float_tests) / sizeof(float_tests[0]); i++)
assert(check_float_format_test(float_tests[i]));
}
+#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-security"