diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-14 15:23:54 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-09-14 15:23:54 +0000 |
commit | f2e87a71aed19603c7d2701f4b8a20cbf8b74ce2 (patch) | |
tree | e4b9f818b34d1c46da39d8c53e09a18435dcbb98 /NxWidgets/UnitTests/CButton | |
parent | b12d1dada94cd7083c2a5a023ec2e7a9a51c192a (diff) | |
download | nuttx-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/CButton')
-rw-r--r-- | NxWidgets/UnitTests/CButton/Makefile | 2 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CButton/cbutton_main.cxx (renamed from NxWidgets/UnitTests/CButton/main.cxx) | 28 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CButton/cbuttontest.hxx | 10 |
3 files changed, 15 insertions, 25 deletions
diff --git a/NxWidgets/UnitTests/CButton/Makefile b/NxWidgets/UnitTests/CButton/Makefile index 4e1ae042f..77ba7e986 100644 --- a/NxWidgets/UnitTests/CButton/Makefile +++ b/NxWidgets/UnitTests/CButton/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cbuttontest.cxx +CXXSRCS = cbutton_main.cxx cbuttontest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CButton/main.cxx b/NxWidgets/UnitTests/CButton/cbutton_main.cxx index 13e9099d9..973a2cd8a 100644 --- a/NxWidgets/UnitTests/CButton/main.cxx +++ b/NxWidgets/UnitTests/CButton/cbutton_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CButton/main.cxx +// NxWidgets/UnitTests/CButton/cbutton_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt <gnutt@nuttx.org> @@ -68,7 +68,7 @@ static const char g_pushme[] = "Push Me"; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cbutton_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Public Functions @@ -78,29 +78,29 @@ extern "C" int MAIN_NAME(int argc, char *argv[]); // user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cbutton_main(int argc, char *argv[]) { // Create an instance of the font test - printf(MAIN_STRING "Create CButtonTest instance\n"); + printf("cbutton_main: Create CButtonTest instance\n"); CButtonTest *test = new CButtonTest(); // Connect the NX server - printf(MAIN_STRING "Connect the CButtonTest instance to the NX server\n"); + printf("cbutton_main: Connect the CButtonTest instance to the NX server\n"); if (!test->connect()) { - printf(MAIN_STRING "Failed to connect the CButtonTest instance to the NX server\n"); + printf("cbutton_main: Failed to connect the CButtonTest instance to the NX server\n"); delete test; return 1; } // Create a window to draw into - printf(MAIN_STRING "Create a Window\n"); + printf("cbutton_main: Create a Window\n"); if (!test->createWindow()) { - printf(MAIN_STRING "Failed to create a window\n"); + printf("cbutton_main: Failed to create a window\n"); delete test; return 1; } @@ -110,26 +110,26 @@ int MAIN_NAME(int argc, char *argv[]) CButton *button = test->createButton(g_pushme); if (!button) { - printf(MAIN_STRING "Failed to create a button\n"); + printf("cbutton_main: Failed to create a button\n"); delete test; return 1; } // Show the button - printf(MAIN_STRING "Show the button\n"); + printf("cbutton_main: Show the button\n"); test->showButton(button); // Wait two seconds, then perform a simulated mouse click on the button sleep(2); - printf(MAIN_STRING "Click the button\n"); + printf("cbutton_main: Click the button\n"); test->click(); // Poll for the mouse click event (of course this can hang if something fails) bool clicked = test->poll(button); - printf(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released"); + printf("cbutton_main: Button is %s\n", clicked ? "clicked" : "released"); // Wait a second, then release the mouse buttone @@ -139,7 +139,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); - printf(MAIN_STRING "Button is %s\n", clicked ? "clicked" : "released"); + printf("cbutton_main: Button is %s\n", clicked ? "clicked" : "released"); // Wait a few more seconds so that the tester can ponder the result @@ -147,7 +147,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - printf(MAIN_STRING "Clean-up and exit\n"); + printf("cbutton_main: Clean-up and exit\n"); delete button; delete test; return 0; diff --git a/NxWidgets/UnitTests/CButton/cbuttontest.hxx b/NxWidgets/UnitTests/CButton/cbuttontest.hxx index cba947b73..10465c06e 100644 --- a/NxWidgets/UnitTests/CButton/cbuttontest.hxx +++ b/NxWidgets/UnitTests/CButton/cbuttontest.hxx @@ -75,16 +75,6 @@ # define CONFIG_CBUTTONTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cbutton_main -# define MAIN_STRING "cbutton_main: " -#else -# define MAIN_NAME user_start -# define MAIN_STRING "user_start: " -#endif - ///////////////////////////////////////////////////////////////////////////// // Public Classes ///////////////////////////////////////////////////////////////////////////// |