summaryrefslogtreecommitdiff
path: root/NxWidgets/UnitTests/CCheckBox
diff options
context:
space:
mode:
Diffstat (limited to 'NxWidgets/UnitTests/CCheckBox')
-rw-r--r--NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx25
-rw-r--r--NxWidgets/UnitTests/CCheckBox/ccheckboxtest.cxx12
-rw-r--r--NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx9
3 files changed, 18 insertions, 28 deletions
diff --git a/NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx b/NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
index e2c4bc148..b0a74fc14 100644
--- a/NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx
+++ b/NxWidgets/UnitTests/CCheckBox/ccheckbox_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 ccheckbox_main(int argc, char *argv[])
// Create an instance of the checkbox test
- message("ccheckbox_main: Create CCheckBoxTest instance\n");
+ printf("ccheckbox_main: Create CCheckBoxTest instance\n");
CCheckBoxTest *test = new CCheckBoxTest();
updateMemoryUsage(g_mmprevious, "After creating CCheckBoxTest");
// Connect the NX server
- message("ccheckbox_main: Connect the CCheckBoxTest instance to the NX server\n");
+ printf("ccheckbox_main: Connect the CCheckBoxTest instance to the NX server\n");
if (!test->connect())
{
- message("ccheckbox_main: Failed to connect the CCheckBoxTest instance to the NX server\n");
+ printf("ccheckbox_main: Failed to connect the CCheckBoxTest instance to the NX server\n");
delete test;
return 1;
}
@@ -160,10 +160,10 @@ int ccheckbox_main(int argc, char *argv[])
// Create a window to draw into
- message("ccheckbox_main: Create a Window\n");
+ printf("ccheckbox_main: Create a Window\n");
if (!test->createWindow())
{
- message("ccheckbox_main: Failed to create a window\n");
+ printf("ccheckbox_main: Failed to create a window\n");
delete test;
return 1;
}
@@ -177,21 +177,21 @@ int ccheckbox_main(int argc, char *argv[])
// Now click the checkbox
- message("ccheckbox_main: Click 1\n");
+ printf("ccheckbox_main: Click 1\n");
test->clickCheckBox();
usleep(500*1000);
test->showCheckBoxState();
updateMemoryUsage(g_mmprevious, "After click 1");
usleep(500*1000);
- message("ccheckbox_main: Click 2\n");
+ printf("ccheckbox_main: Click 2\n");
test->clickCheckBox();
usleep(500*1000);
test->showCheckBoxState();
updateMemoryUsage(g_mmprevious, "After click 2");
usleep(500*1000);
- message("ccheckbox_main: Click 3\n");
+ printf("ccheckbox_main: Click 3\n");
test->clickCheckBox();
usleep(500*1000);
test->showCheckBoxState();
@@ -200,10 +200,9 @@ int ccheckbox_main(int argc, char *argv[])
// Clean up and exit
- message("ccheckbox_main: Clean-up and exit\n");
+ printf("ccheckbox_main: Clean-up and exit\n");
delete test;
updateMemoryUsage(g_mmprevious, "After deleting the test");
updateMemoryUsage(g_mmInitial, "Final memory usage");
return 0;
}
-
diff --git a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.cxx b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.cxx
index e9ccc7628..0f8fb46ad 100644
--- a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.cxx
+++ b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.cxx
@@ -108,7 +108,7 @@ bool CCheckBoxTest::connect(void)
if (!setBackgroundColor(CONFIG_CCHECKBOXTEST_BGCOLOR))
{
- message("CCheckBoxTest::connect: setBackgroundColor failed\n");
+ printf("CCheckBoxTest::connect: setBackgroundColor failed\n");
}
}
@@ -172,7 +172,7 @@ bool CCheckBoxTest::createWindow(void)
m_bgWindow = getBgWindow(m_widgetControl);
if (!m_bgWindow)
{
- message("CCheckBoxTest::createWindow: Failed to create CBgWindow instance\n");
+ printf("CCheckBoxTest::createWindow: Failed to create CBgWindow instance\n");
disconnect();
return false;
}
@@ -182,7 +182,7 @@ bool CCheckBoxTest::createWindow(void)
bool success = m_bgWindow->open();
if (!success)
{
- message("CCheckBoxTest::createWindow: Failed to open background window\n");
+ printf("CCheckBoxTest::createWindow: Failed to open background window\n");
disconnect();
return false;
}
@@ -282,16 +282,16 @@ void CCheckBoxTest::showCheckBoxState(void)
switch (state)
{
case CCheckBox::CHECK_BOX_STATE_OFF: // Checkbox is unticked
- message("CCheckBoxTest::showCheckBoxState Checkbox is in the unticked state\n");
+ printf("CCheckBoxTest::showCheckBoxState Checkbox is in the unticked state\n");
break;
case CCheckBox::CHECK_BOX_STATE_ON: // Checkbox is ticked
- message("CCheckBoxTest::showCheckBoxState Check is in the ticked state\n");
+ printf("CCheckBoxTest::showCheckBoxState Check is in the ticked state\n");
break;
default:
case CCheckBox::CHECK_BOX_STATE_MU: // Checkbox is in the third state
- message("CCheckBoxTest::showCheckBoxState Checkbox is in the 3rd state\n");
+ printf("CCheckBoxTest::showCheckBoxState Checkbox is in the 3rd state\n");
break;
}
}
diff --git a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx
index 58099acdf..338be4fb2 100644
--- a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx
+++ b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx
@@ -69,15 +69,6 @@
# define CONFIG_CCHECKBOXTEST_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
/////////////////////////////////////////////////////////////////////////////