summaryrefslogtreecommitdiff
path: root/NxWidgets/UnitTests/CSliderHorizonal
diff options
context:
space:
mode:
Diffstat (limited to 'NxWidgets/UnitTests/CSliderHorizonal')
-rw-r--r--NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx32
-rw-r--r--NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx6
-rw-r--r--NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx9
3 files changed, 19 insertions, 28 deletions
diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx
index fc57ab98c..0d63ed20a 100644
--- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx
+++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontal_main.cxx
@@ -98,9 +98,9 @@ static void updateMemoryUsage(unsigned int previous,
/* Show the change from the previous time */
- message("\n%s:\n", msg);
- message(" Before: %8d After: %8d Change: %8d\n\n",
- previous, mmcurrent.uordblks, mmcurrent.uordblks - previous);
+ printf("\n%s:\n", msg);
+ printf(" Before: %8d After: %8d Change: %8d\n\n",
+ previous, mmcurrent.uordblks, mmcurrent.uordblks - previous);
/* Set up for the next test */
@@ -143,16 +143,16 @@ int csliderhorizontal_main(int argc, char *argv[])
// Create an instance of the checkbox test
- message("csliderhorizontal_main: Create CSliderHorizontalTest instance\n");
+ printf("csliderhorizontal_main: Create CSliderHorizontalTest instance\n");
CSliderHorizontalTest *test = new CSliderHorizontalTest();
updateMemoryUsage(g_mmprevious, "After creating CSliderHorizontalTest");
// Connect the NX server
- message("csliderhorizontal_main: Connect the CSliderHorizontalTest instance to the NX server\n");
+ printf("csliderhorizontal_main: Connect the CSliderHorizontalTest instance to the NX server\n");
if (!test->connect())
{
- message("csliderhorizontal_main: Failed to connect the CSliderHorizontalTest instance to the NX server\n");
+ printf("csliderhorizontal_main: Failed to connect the CSliderHorizontalTest instance to the NX server\n");
delete test;
return 1;
}
@@ -160,10 +160,10 @@ int csliderhorizontal_main(int argc, char *argv[])
// Create a window to draw into
- message("csliderhorizontal_main: Create a Window\n");
+ printf("csliderhorizontal_main: Create a Window\n");
if (!test->createWindow())
{
- message("csliderhorizontal_main: Failed to create a window\n");
+ printf("csliderhorizontal_main: Failed to create a window\n");
delete test;
return 1;
}
@@ -171,11 +171,11 @@ int csliderhorizontal_main(int argc, char *argv[])
// Create a slider
- message("csliderhorizontal_main: Create a Slider\n");
+ printf("csliderhorizontal_main: Create a Slider\n");
CSliderHorizontal *slider = test->createSlider();
if (!slider)
{
- message("csliderhorizontal_main: Failed to create a slider\n");
+ printf("csliderhorizontal_main: Failed to create a slider\n");
delete test;
return 1;
}
@@ -186,9 +186,9 @@ int csliderhorizontal_main(int argc, char *argv[])
slider->setMinimumValue(0);
slider->setMaximumValue(MAX_SLIDER);
slider->setValue(0);
- message("csliderhorizontal_main: Slider range %d->%d Initial value %d\n",
- slider->getMinimumValue(), slider->getMaximumValue(),
- slider->getValue());
+ printf("csliderhorizontal_main: Slider range %d->%d Initial value %d\n",
+ slider->getMinimumValue(), slider->getMaximumValue(),
+ slider->getValue());
// Show the initial state of the checkbox
@@ -201,7 +201,7 @@ int csliderhorizontal_main(int argc, char *argv[])
{
slider->setValue(i);
test->showSlider(slider);
- message("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue());
+ printf("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue());
usleep(1000); // The simulation needs this to let the X11 event loop run
}
updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After moving the slider up");
@@ -212,7 +212,7 @@ int csliderhorizontal_main(int argc, char *argv[])
{
slider->setValue(i);
test->showSlider(slider);
- message("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue());
+ printf("csliderhorizontal_main: %d. New value %d\n", i, slider->getValue());
usleep(1000); // The simulation needs this to let the X11 event loop run
}
updateMemoryUsage(g_mmprevious, "csliderhorizontal_main: After moving the slider down");
@@ -220,7 +220,7 @@ int csliderhorizontal_main(int argc, char *argv[])
// Clean up and exit
- message("csliderhorizontal_main: Clean-up and exit\n");
+ printf("csliderhorizontal_main: Clean-up and exit\n");
delete slider;
updateMemoryUsage(g_mmprevious, "After deleting the slider");
delete test;
diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx
index 1687448db..581478841 100644
--- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx
+++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.cxx
@@ -105,7 +105,7 @@ bool CSliderHorizontalTest::connect(void)
if (!setBackgroundColor(CONFIG_CSLIDERHORIZONTALTEST_BGCOLOR))
{
- message("CSliderHorizontalTest::connect: setBackgroundColor failed\n");
+ printf("CSliderHorizontalTest::connect: setBackgroundColor failed\n");
}
}
@@ -161,7 +161,7 @@ bool CSliderHorizontalTest::createWindow(void)
m_bgWindow = getBgWindow(m_widgetControl);
if (!m_bgWindow)
{
- message("CSliderHorizontalTest::createWindow: Failed to create CBgWindow instance\n");
+ printf("CSliderHorizontalTest::createWindow: Failed to create CBgWindow instance\n");
disconnect();
return false;
}
@@ -171,7 +171,7 @@ bool CSliderHorizontalTest::createWindow(void)
bool success = m_bgWindow->open();
if (!success)
{
- message("CSliderHorizontalTest::createWindow: Failed to open background window\n");
+ printf("CSliderHorizontalTest::createWindow: Failed to open background window\n");
disconnect();
return false;
}
diff --git a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx
index fd333af5c..8d5db0772 100644
--- a/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx
+++ b/NxWidgets/UnitTests/CSliderHorizonal/csliderhorizontaltest.hxx
@@ -69,15 +69,6 @@
# define CONFIG_CSLIDERHORIZONTALTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR
#endif
-// If debug is enabled, use the debug function, syslog() instead
-// of printf() so that the output is synchronized.
-
-#ifdef CONFIG_DEBUG
-# define message lowsyslog
-#else
-# define message printf
-#endif
-
/////////////////////////////////////////////////////////////////////////////
// Public Classes
/////////////////////////////////////////////////////////////////////////////