summaryrefslogtreecommitdiff
path: root/ACE/tests
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2007-01-30 09:46:46 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2007-01-30 09:46:46 +0000
commit3dcef29d71d37f4b61c9bc1caafc0a672a720129 (patch)
treed112d3186d447ee60438cc7c7ee840ede33d6912 /ACE/tests
parent62648aec1b7d74be37d8e16d8d20111ef87c3b42 (diff)
downloadATCD-3dcef29d71d37f4b61c9bc1caafc0a672a720129.tar.gz
Tue Jan 30 09:46:14 2007 Johnny Willemsen <jwillemsen@remedy.nl>
Diffstat (limited to 'ACE/tests')
-rw-r--r--ACE/tests/OS_Test.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/ACE/tests/OS_Test.cpp b/ACE/tests/OS_Test.cpp
index d270a19d66c..5bc67ab977c 100644
--- a/ACE/tests/OS_Test.cpp
+++ b/ACE/tests/OS_Test.cpp
@@ -895,6 +895,29 @@ cpu_info_test (void)
}
int
+pagesize_test (void)
+{
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Testing getpagesize method\n")));
+
+ long const pagesize = ACE_OS::getpagesize ();
+ if (pagesize <= 0)
+ {
+ ACE_ERROR ((LM_ERROR, ACE_TEXT ("Pagesize should return a value bigger ")
+ ACE_TEXT ("then zero, it returned %d\n"), pagesize));
+ return 1;
+ }
+ else
+ {
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("Pagesize returned %d\n"),
+ pagesize));
+ }
+ return 0;
+}
+
+
+int
run_main (int, ACE_TCHAR *[])
{
ACE_START_TEST (ACE_TEXT ("OS_Test"));
@@ -925,6 +948,9 @@ run_main (int, ACE_TCHAR *[])
if ((result = cpu_info_test ()) != 0)
status = result;
+ if ((result = pagesize_test ()) != 0)
+ status = result;
+
ACE_END_TEST;
return status;
}