diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2014-02-01 18:08:24 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2014-02-03 13:17:25 -0500 |
commit | b1fccd03798da1930755557cb4516526cc09bb15 (patch) | |
tree | 1e55b79bd9f8858d229e6194d714bf784a375a67 /libdimension/tests | |
parent | a93f1969c780b831d5c4cb5bde938320f2ffd763 (diff) | |
download | dimension-b1fccd03798da1930755557cb4516526cc09bb15.tar.xz |
Use strerror_r if available instead of sys_errlist.
Diffstat (limited to 'libdimension/tests')
-rw-r--r-- | libdimension/tests/error.c | 4 | ||||
-rw-r--r-- | libdimension/tests/prtree.c | 8 | ||||
-rw-r--r-- | libdimension/tests/warning-as-error.c | 4 | ||||
-rw-r--r-- | libdimension/tests/warning.c | 4 |
4 files changed, 13 insertions, 7 deletions
diff --git a/libdimension/tests/error.c b/libdimension/tests/error.c index 5a4d7fd..f4ffcee 100644 --- a/libdimension/tests/error.c +++ b/libdimension/tests/error.c @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> * * * * This file is part of The Dimension Test Suite. * * * @@ -21,10 +21,12 @@ #include "dimension.h" #include <stdlib.h> +#include <errno.h> int main(void) { + errno = ENOMEM; dmnsn_error("This error is expected."); return EXIT_SUCCESS; } diff --git a/libdimension/tests/prtree.c b/libdimension/tests/prtree.c index 2642f48..b2a2be6 100644 --- a/libdimension/tests/prtree.c +++ b/libdimension/tests/prtree.c @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2010-2012 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2010-2014 Tavian Barnes <tavianator@tavianator.com> * * * * This file is part of The Dimension Test Suite. * * * @@ -21,11 +21,11 @@ * Basic tests of PR-trees */ -#include "../bvh.c" -#include "../prtree.c" +#include "../platform.c" #include "../threads.c" #include "../future.c" -#include "../platform.c" +#include "../bvh.c" +#include "../prtree.c" #include <stdio.h> #include <stdlib.h> diff --git a/libdimension/tests/warning-as-error.c b/libdimension/tests/warning-as-error.c index ce274d3..dfc08d6 100644 --- a/libdimension/tests/warning-as-error.c +++ b/libdimension/tests/warning-as-error.c @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2009-2011 Tavian Barnes <tavianator@gmail.com> * + * Copyright (C) 2009-2014 Tavian Barnes <tavianator@gmail.com> * * * * This file is part of The Dimension Test Suite. * * * @@ -21,11 +21,13 @@ #include "dimension.h" #include <stdlib.h> +#include <errno.h> int main(void) { dmnsn_die_on_warnings(true); + errno = ENOMEM; dmnsn_warning("This warning is expected."); return EXIT_SUCCESS; } diff --git a/libdimension/tests/warning.c b/libdimension/tests/warning.c index aecedd5..4e5dd75 100644 --- a/libdimension/tests/warning.c +++ b/libdimension/tests/warning.c @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> * + * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> * * * * This file is part of The Dimension Test Suite. * * * @@ -21,10 +21,12 @@ #include "dimension.h" #include <stdlib.h> +#include <errno.h> int main(void) { + errno = ENOMEM; dmnsn_warning("This warning is expected."); return EXIT_SUCCESS; } |