mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 10: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 ctextboxtest.cxx
|
||||
CXXSRCS = ctextbox_main.cxx ctextboxtest.cxx
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
+10
-10
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// NxWidgets/UnitTests/CTextBox/main.cxx
|
||||
// NxWidgets/UnitTests/CTextBox/ctextbox_main.cxx
|
||||
//
|
||||
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -69,7 +69,7 @@ static const char string2[] = "\b\b\bn Doe\r";
|
||||
|
||||
// Suppress name-mangling
|
||||
|
||||
extern "C" int MAIN_NAME(int argc, char *argv[]);
|
||||
extern "C" int ctextbox_main(int argc, char *argv[]);
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Public Functions
|
||||
@@ -79,29 +79,29 @@ extern "C" int MAIN_NAME(int argc, char *argv[]);
|
||||
// user_start/nxheaders_main
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int MAIN_NAME(int argc, char *argv[])
|
||||
int ctextbox_main(int argc, char *argv[])
|
||||
{
|
||||
// Create an instance of the font test
|
||||
|
||||
printf(MAIN_STRING "Create CTextBoxTest instance\n");
|
||||
printf("ctextbox_main: Create CTextBoxTest instance\n");
|
||||
CTextBoxTest *test = new CTextBoxTest();
|
||||
|
||||
// Connect the NX server
|
||||
|
||||
printf(MAIN_STRING "Connect the CTextBoxTest instance to the NX server\n");
|
||||
printf("ctextbox_main: Connect the CTextBoxTest instance to the NX server\n");
|
||||
if (!test->connect())
|
||||
{
|
||||
printf(MAIN_STRING "Failed to connect the CTextBoxTest instance to the NX server\n");
|
||||
printf("ctextbox_main: Failed to connect the CTextBoxTest instance to the NX server\n");
|
||||
delete test;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Create a window to draw into
|
||||
|
||||
printf(MAIN_STRING "Create a Window\n");
|
||||
printf("ctextbox_main: Create a Window\n");
|
||||
if (!test->createWindow())
|
||||
{
|
||||
printf(MAIN_STRING "Failed to create a window\n");
|
||||
printf("ctextbox_main: Failed to create a window\n");
|
||||
delete test;
|
||||
return 1;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ int MAIN_NAME(int argc, char *argv[])
|
||||
CTextBox *textbox = test->createTextBox();
|
||||
if (!textbox)
|
||||
{
|
||||
printf(MAIN_STRING "Failed to create a text box\n");
|
||||
printf("ctextbox_main: Failed to create a text box\n");
|
||||
delete test;
|
||||
return 1;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ int MAIN_NAME(int argc, char *argv[])
|
||||
// Clean up and exit
|
||||
|
||||
sleep(2);
|
||||
printf(MAIN_STRING "Clean-up and exit\n");
|
||||
printf("ctextbox_main: Clean-up and exit\n");
|
||||
delete textbox;
|
||||
delete test;
|
||||
return 0;
|
||||
@@ -75,16 +75,6 @@
|
||||
# define CONFIG_CTEXTBOXTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR
|
||||
#endif
|
||||
|
||||
// What is the entry point called?
|
||||
|
||||
#ifdef CONFIG_NSH_BUILTIN_APPS
|
||||
# define MAIN_NAME ctextbox_main
|
||||
# define MAIN_STRING "ctextbox_main: "
|
||||
#else
|
||||
# define MAIN_NAME user_start
|
||||
# define MAIN_STRING "user_start: "
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Public Classes
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user