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/CCheckBox | |
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/CCheckBox')
-rw-r--r-- | NxWidgets/UnitTests/CCheckBox/Makefile | 2 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx (renamed from NxWidgets/UnitTests/CCheckBox/main.cxx) | 28 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx | 10 |
3 files changed, 15 insertions, 25 deletions
diff --git a/NxWidgets/UnitTests/CCheckBox/Makefile b/NxWidgets/UnitTests/CCheckBox/Makefile index 6b31286df..9b46cef8d 100644 --- a/NxWidgets/UnitTests/CCheckBox/Makefile +++ b/NxWidgets/UnitTests/CCheckBox/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx ccheckboxtest.cxx +CXXSRCS = ccheckbox_main.cxx ccheckboxtest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CCheckBox/main.cxx b/NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx index e9e8b516f..949cbc35f 100644 --- a/NxWidgets/UnitTests/CCheckBox/main.cxx +++ b/NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CCheckBox/main.cxx +// NxWidgets/UnitTests/CCheckBox/ccheckbox_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt <gnutt@nuttx.org> @@ -73,7 +73,7 @@ static unsigned int g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int ccheckbox_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -135,7 +135,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int ccheckbox_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -143,31 +143,31 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the checkbox test - message(MAIN_STRING "Create CCheckBoxTest instance\n"); + message("ccheckbox_main: Create CCheckBoxTest instance\n"); CCheckBoxTest *test = new CCheckBoxTest(); updateMemoryUsage(g_mmprevious, "After creating CCheckBoxTest"); // Connect the NX server - message(MAIN_STRING "Connect the CCheckBoxTest instance to the NX server\n"); + message("ccheckbox_main: Connect the CCheckBoxTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CCheckBoxTest instance to the NX server\n"); + message("ccheckbox_main: Failed to connect the CCheckBoxTest instance to the NX server\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After connecting to the server"); + updateMemoryUsage(g_mmprevious, "ccheckbox_main: After connecting to the server"); // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("ccheckbox_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("ccheckbox_main: Failed to create a window\n"); delete test; return 1; } - updateMemoryUsage(g_mmprevious, MAIN_STRING "After creating a window"); + updateMemoryUsage(g_mmprevious, "ccheckbox_main: After creating a window"); // Show the initial state of the checkbox @@ -177,21 +177,21 @@ int MAIN_NAME(int argc, char *argv[]) // Now click the checkbox - message(MAIN_STRING "Click 1\n"); + message("ccheckbox_main: Click 1\n"); test->clickCheckBox(); usleep(500*1000); test->showCheckBoxState(); updateMemoryUsage(g_mmprevious, "After click 1"); usleep(500*1000); - message(MAIN_STRING "Click 2\n"); + message("ccheckbox_main: Click 2\n"); test->clickCheckBox(); usleep(500*1000); test->showCheckBoxState(); updateMemoryUsage(g_mmprevious, "After click 2"); usleep(500*1000); - message(MAIN_STRING "Click 3\n"); + message("ccheckbox_main: Click 3\n"); test->clickCheckBox(); usleep(500*1000); test->showCheckBoxState(); @@ -200,7 +200,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("ccheckbox_main: Clean-up and exit\n"); delete test; updateMemoryUsage(g_mmprevious, "After deleting the test"); updateMemoryUsage(g_mmInitial, "Final memory usage"); diff --git a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx index 73e72e282..0397b37dd 100644 --- a/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx +++ b/NxWidgets/UnitTests/CCheckBox/ccheckboxtest.hxx @@ -69,16 +69,6 @@ # define CONFIG_CCHECKBOXTEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME ccheckbox_main -# define MAIN_STRING "ccheckbox_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. |