mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 15:43:34 +08:00
Update all unit tests to conform to recent naming convention changes in NuttX
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5151 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user