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:
patacongo
2012-09-14 15:23:54 +00:00
parent cc0c42dd31
commit 857d2a770b
56 changed files with 311 additions and 487 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ ARCHIVER=$(TESTTOOL_DIR)/addobjs.sh
ASRCS =
CSRCS =
CXXSRCS = main.cxx clabeltest.cxx
CXXSRCS = clabel_main.cxx clabeltest.cxx
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// NxWidgets/UnitTests/CLabel/main.cxx
// NxWidgets/UnitTests/CLabel/clabel_main.cxx
//
// Copyright (C) 2012 Gregory Nutt. All rights reserved.
// Author: Gregory Nutt <gnutt@nuttx.org>
@@ -68,7 +68,7 @@ static const char g_hello[] = "Hello, World!";
// Suppress name-mangling
extern "C" int MAIN_NAME(int argc, char *argv[]);
extern "C" int clabel_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 clabel_main(int argc, char *argv[])
{
// Create an instance of the font test
printf(MAIN_STRING "Create CLabelTest instance\n");
printf("clabel_main: Create CLabelTest instance\n");
CLabelTest *test = new CLabelTest();
// Connect the NX server
printf(MAIN_STRING "Connect the CLabelTest instance to the NX server\n");
printf("clabel_main: Connect the CLabelTest instance to the NX server\n");
if (!test->connect())
{
printf(MAIN_STRING "Failed to connect the CLabelTest instance to the NX server\n");
printf("clabel_main: Failed to connect the CLabelTest instance to the NX server\n");
delete test;
return 1;
}
// Create a window to draw into
printf(MAIN_STRING "Create a Window\n");
printf("clabel_main: Create a Window\n");
if (!test->createWindow())
{
printf(MAIN_STRING "Failed to create a window\n");
printf("clabel_main: Failed to create a window\n");
delete test;
return 1;
}
@@ -110,7 +110,7 @@ int MAIN_NAME(int argc, char *argv[])
CLabel *label = test->createLabel(g_hello);
if (!label)
{
printf(MAIN_STRING "Failed to create a label\n");
printf("clabel_main: Failed to create a label\n");
delete test;
return 1;
}
@@ -122,7 +122,7 @@ int MAIN_NAME(int argc, char *argv[])
// Clean up and exit
printf(MAIN_STRING "Clean-up and exit\n");
printf("clabel_main: Clean-up and exit\n");
delete label;
delete test;
return 0;
-10
View File
@@ -75,16 +75,6 @@
# define CONFIG_CLABELTEST_FONTCOLOR CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR
#endif
// What is the entry point called?
#ifdef CONFIG_NSH_BUILTIN_APPS
# define MAIN_NAME clabel_main
# define MAIN_STRING "clabel_main: "
#else
# define MAIN_NAME user_start
# define MAIN_STRING "user_start: "
#endif
/////////////////////////////////////////////////////////////////////////////
// Public Classes
/////////////////////////////////////////////////////////////////////////////