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/CImage | |
parent | b12d1dada94cd7083c2a5a023ec2e7a9a51c192a (diff) | |
download | px4-nuttx-f2e87a71aed19603c7d2701f4b8a20cbf8b74ce2.tar.gz px4-nuttx-f2e87a71aed19603c7d2701f4b8a20cbf8b74ce2.tar.bz2 px4-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/CImage')
-rw-r--r-- | NxWidgets/UnitTests/CImage/Makefile | 2 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CImage/cimage_main.cxx (renamed from NxWidgets/UnitTests/CImage/main.cxx) | 20 | ||||
-rw-r--r-- | NxWidgets/UnitTests/CImage/cimagetest.hxx | 10 |
3 files changed, 11 insertions, 21 deletions
diff --git a/NxWidgets/UnitTests/CImage/Makefile b/NxWidgets/UnitTests/CImage/Makefile index 8db783364..46e69c495 100644 --- a/NxWidgets/UnitTests/CImage/Makefile +++ b/NxWidgets/UnitTests/CImage/Makefile @@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh ASRCS = CSRCS = -CXXSRCS = main.cxx cimagetest.cxx +CXXSRCS = cimage_main.cxx cimagetest.cxx AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) diff --git a/NxWidgets/UnitTests/CImage/main.cxx b/NxWidgets/UnitTests/CImage/cimage_main.cxx index dd066b809..30cf49d3e 100644 --- a/NxWidgets/UnitTests/CImage/main.cxx +++ b/NxWidgets/UnitTests/CImage/cimage_main.cxx @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// NxWidgets/UnitTests/CImage/main.cxx +// NxWidgets/UnitTests/CImage/cimage_main.cxx // // Copyright (C) 2012 Gregory Nutt. All rights reserved. // Author: Gregory Nutt <gnutt@nuttx.org> @@ -73,7 +73,7 @@ static struct mallinfo g_mmprevious; // Suppress name-mangling -extern "C" int MAIN_NAME(int argc, char *argv[]); +extern "C" int cimage_main(int argc, char *argv[]); ///////////////////////////////////////////////////////////////////////////// // Private Functions @@ -149,7 +149,7 @@ static void initMemoryUsage(void) // Name: user_start/nxheaders_main ///////////////////////////////////////////////////////////////////////////// -int MAIN_NAME(int argc, char *argv[]) +int cimage_main(int argc, char *argv[]) { // Initialize memory monitor logic @@ -157,16 +157,16 @@ int MAIN_NAME(int argc, char *argv[]) // Create an instance of the font test - message(MAIN_STRING "Create CImageTest instance\n"); + message("cimage_main: Create CImageTest instance\n"); CImageTest *test = new CImageTest(); updateMemoryUsage(&g_mmprevious, "After creating CImageTest"); // Connect the NX server - message(MAIN_STRING "Connect the CImageTest instance to the NX server\n"); + message("cimage_main: Connect the CImageTest instance to the NX server\n"); if (!test->connect()) { - message(MAIN_STRING "Failed to connect the CImageTest instance to the NX server\n"); + message("cimage_main: Failed to connect the CImageTest instance to the NX server\n"); delete test; return 1; } @@ -174,10 +174,10 @@ int MAIN_NAME(int argc, char *argv[]) // Create a window to draw into - message(MAIN_STRING "Create a Window\n"); + message("cimage_main: Create a Window\n"); if (!test->createWindow()) { - message(MAIN_STRING "Failed to create a window\n"); + message("cimage_main: Failed to create a window\n"); delete test; return 1; } @@ -193,7 +193,7 @@ int MAIN_NAME(int argc, char *argv[]) CImage *image = test->createImage(static_cast<IBitmap*>(nuttxBitmap)); if (!image) { - message(MAIN_STRING "Failed to create a image\n"); + message("cimage_main: Failed to create a image\n"); delete test; return 1; } @@ -207,7 +207,7 @@ int MAIN_NAME(int argc, char *argv[]) // Clean up and exit - message(MAIN_STRING "Clean-up and exit\n"); + message("cimage_main: Clean-up and exit\n"); delete image; updateMemoryUsage(&g_mmprevious, "After deleting CImage"); diff --git a/NxWidgets/UnitTests/CImage/cimagetest.hxx b/NxWidgets/UnitTests/CImage/cimagetest.hxx index 64592ee23..9592f2936 100644 --- a/NxWidgets/UnitTests/CImage/cimagetest.hxx +++ b/NxWidgets/UnitTests/CImage/cimagetest.hxx @@ -71,16 +71,6 @@ # define CONFIG_CIMAGETEST_BGCOLOR CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR #endif -// What is the entry point called? - -#ifdef CONFIG_NSH_BUILTIN_APPS -# define MAIN_NAME cimage_main -# define MAIN_STRING "cimage_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. |