summaryrefslogtreecommitdiffstats
path: root/libdimension/tests
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/tests')
-rw-r--r--libdimension/tests/error.c4
-rw-r--r--libdimension/tests/prtree.c8
-rw-r--r--libdimension/tests/warning-as-error.c4
-rw-r--r--libdimension/tests/warning.c4
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;
}