summaryrefslogtreecommitdiff
path: root/NxWidgets/UnitTests/CGlyphButton
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-14 15:23:54 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-14 15:23:54 +0000
commitf2e87a71aed19603c7d2701f4b8a20cbf8b74ce2 (patch)
treee4b9f818b34d1c46da39d8c53e09a18435dcbb98 /NxWidgets/UnitTests/CGlyphButton
parentb12d1dada94cd7083c2a5a023ec2e7a9a51c192a (diff)
downloadnuttx-f2e87a71aed19603c7d2701f4b8a20cbf8b74ce2.tar.gz
nuttx-f2e87a71aed19603c7d2701f4b8a20cbf8b74ce2.tar.bz2
nuttx-f2e87a71aed19603c7d2701f4b8a20cbf8b74ce2.zip
Update all unit tests to conform to recent naming convention changes in NuttX
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5151 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'NxWidgets/UnitTests/CGlyphButton')
-rw-r--r--NxWidgets/UnitTests/CGlyphButton/Makefile2
-rw-r--r--NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx (renamed from NxWidgets/UnitTests/CGlyphButton/main.cxx)28
-rw-r--r--NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx10
3 files changed, 15 insertions, 25 deletions
diff --git a/NxWidgets/UnitTests/CGlyphButton/Makefile b/NxWidgets/UnitTests/CGlyphButton/Makefile
index 01e843555..5f2522e49 100644
--- a/NxWidgets/UnitTests/CGlyphButton/Makefile
+++ b/NxWidgets/UnitTests/CGlyphButton/Makefile
@@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh
ASRCS =
CSRCS =
-CXXSRCS = main.cxx cglyphbuttontest.cxx
+CXXSRCS = cglyphbutton_main.cxx cglyphbuttontest.cxx
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/NxWidgets/UnitTests/CGlyphButton/main.cxx b/NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
index 7812fa9e9..95e255dcc 100644
--- a/NxWidgets/UnitTests/CGlyphButton/main.cxx
+++ b/NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
-// NxWidgets/UnitTests/CGlyphButton/main.cxx
+// NxWidgets/UnitTests/CGlyphButton/cglyphbutton_main.cxx
//
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
// Author: Gregory Nutt <gnutt@nuttx.org>
@@ -72,7 +72,7 @@ static unsigned int g_mmprevious;
// Suppress name-mangling
-extern "C" int MAIN_NAME(int argc, char *argv[]);
+extern "C" int cglyphbutton_main(int argc, char *argv[]);
/////////////////////////////////////////////////////////////////////////////
// Private Functions
@@ -134,7 +134,7 @@ static void initMemoryUsage(void)
// user_start/nxheaders_main
/////////////////////////////////////////////////////////////////////////////
-int MAIN_NAME(int argc, char *argv[])
+int cglyphbutton_main(int argc, char *argv[])
{
// Initialize memory monitor logic
@@ -142,16 +142,16 @@ int MAIN_NAME(int argc, char *argv[])
// Create an instance of the font test
- message(MAIN_STRING "Create CGlyphButtonTest instance\n");
+ message("cglyphbutton_main: Create CGlyphButtonTest instance\n");
CGlyphButtonTest *test = new CGlyphButtonTest();
updateMemoryUsage(g_mmprevious, "After creating CGlyphButtonTest");
// Connect the NX server
- message(MAIN_STRING "Connect the CGlyphButtonTest instance to the NX server\n");
+ message("cglyphbutton_main: Connect the CGlyphButtonTest instance to the NX server\n");
if (!test->connect())
{
- message(MAIN_STRING "Failed to connect the CGlyphButtonTest instance to the NX server\n");
+ message("cglyphbutton_main: Failed to connect the CGlyphButtonTest instance to the NX server\n");
delete test;
return 1;
}
@@ -159,10 +159,10 @@ int MAIN_NAME(int argc, char *argv[])
// Create a window to draw into
- message(MAIN_STRING "Create a Window\n");
+ message("cglyphbutton_main: Create a Window\n");
if (!test->createWindow())
{
- message(MAIN_STRING "Failed to create a window\n");
+ message("cglyphbutton_main: Failed to create a window\n");
delete test;
return 1;
}
@@ -173,7 +173,7 @@ int MAIN_NAME(int argc, char *argv[])
CGlyphButton *button = test->createButton(&g_arrowDown, &g_arrowUp);
if (!button)
{
- message(MAIN_STRING "Failed to create a button\n");
+ message("cglyphbutton_main: Failed to create a button\n");
delete test;
return 1;
}
@@ -181,21 +181,21 @@ int MAIN_NAME(int argc, char *argv[])
// Show the button
- message(MAIN_STRING "Show the button\n");
+ message("cglyphbutton_main: Show the button\n");
test->showButton(button);
updateMemoryUsage(g_mmprevious, "After showing the glyph button");
// Wait two seconds, then perform a simulated mouse click on the button
sleep(2);
- message(MAIN_STRING "Click the button\n");
+ message("cglyphbutton_main: Click the button\n");
test->click();
updateMemoryUsage(g_mmprevious, "After clicking glyph button");
// Poll for the mouse click event (of course this can hang if something fails)
bool clicked = test->poll(button);
- message(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released");
+ message("cglyphbutton_main: Button is %s\n", clicked ? "clicked" : "released");
// Wait a second, then release the mouse buttone
@@ -206,7 +206,7 @@ int MAIN_NAME(int argc, char *argv[])
// Poll for the mouse release event (of course this can hang if something fails)
clicked = test->poll(button);
- message(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released");
+ message("cglyphbutton_main: Button is %s\n", clicked ? "clicked" : "released");
// Wait a few more seconds so that the tester can ponder the result
@@ -214,7 +214,7 @@ int MAIN_NAME(int argc, char *argv[])
// Clean up and exit
- message(MAIN_STRING "Clean-up and exit\n");
+ message("cglyphbutton_main: Clean-up and exit\n");
delete button;
updateMemoryUsage(g_mmprevious, "After deleting the glyph button");
delete test;
diff --git a/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx b/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx
index 940d82a9f..b3e5bb656 100644
--- a/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx
+++ b/NxWidgets/UnitTests/CGlyphButton/cglyphbuttontest.hxx
@@ -76,16 +76,6 @@
# define CONFIG_CGLYPHBUTTONTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR
#endif
-// What is the entry point called?
-
-#ifdef CONFIG_NSH_BUILTIN_APPS
-# define MAIN_NAME cglyphbutton_main
-# define MAIN_STRING "cglyphbutton_main: "
-#else
-# define MAIN_NAME user_start
-# define MAIN_STRING "user_start: "
-#endif
-
// If debug is enabled, use the debug function, lib_rawprintf() instead
// of printf() so that the output is synchronized.