diff options
author | Steve Huston <shuston@riverace.com> | 2003-03-04 22:47:16 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 2003-03-04 22:47:16 +0000 |
commit | 43204230b511a5a124fd310d0927abfd0ec96727 (patch) | |
tree | c3c1a5a5e5ea5ea4b6a17166d3323dcca4f9aa88 /tests | |
parent | ea305f99d79a3afe4097c77e5d5a4e16294fb6f1 (diff) | |
download | ATCD-43204230b511a5a124fd310d0927abfd0ec96727.tar.gz |
ChangeLogTag:Tue Mar 4 17:39:31 2003 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ACE_Test.cpp | 79 | ||||
-rw-r--r-- | tests/ACE_Test.dsp | 162 | ||||
-rw-r--r-- | tests/Makefile | 3 | ||||
-rw-r--r-- | tests/Makefile.bor | 1 | ||||
-rw-r--r-- | tests/run_test.lst | 1 | ||||
-rw-r--r-- | tests/tests.dsw | 12 | ||||
-rw-r--r-- | tests/tests.mpc | 9 |
7 files changed, 266 insertions, 1 deletions
diff --git a/tests/ACE_Test.cpp b/tests/ACE_Test.cpp new file mode 100644 index 00000000000..b9962c753c0 --- /dev/null +++ b/tests/ACE_Test.cpp @@ -0,0 +1,79 @@ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = DESCRIPTION +// This simple test exercises and illustrates use of ACE value-added +// functions. +// +// = AUTHOR +// Steve Huston <shuston@riverace.com> +// +// ============================================================================ + +#include "ace/ACE.h" +#include "test_config.h" + +ACE_RCSID(tests, ACE_Test, "$Id$") + +// Test ACE::execname to be sure it finds .exe without regard to case. +int +execname_test (void) +{ + int error_count = 0; + + // This test is only interesting on Win32 +#if defined (ACE_WIN32) + const ACE_TCHAR *newname; + const ACE_TCHAR *prog1 = ACE_TEXT ("myprog.exe"); + const ACE_TCHAR *prog2 = ACE_TEXT ("myprog.EXE"); + const ACE_TCHAR *prog3 = ACE_TEXT ("myprog"); + + newname = ACE::execname (prog1); + if (newname != prog1) // Didn't find .exe correctly + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Name %s, not %s\n"), newname, prog1)); + delete [] newname; + ++error_count; + } + + newname = ACE::execname (prog2); + if (newname != prog2) // Didn't find .exe correctly + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Name %s, not %s\n"), newname, prog2)); + delete [] newname; + ++error_count; + } + + newname = ACE::execname (prog3); + if (newname == prog3) // Thought the name didn't need .exe + { + ACE_ERROR ((LM_ERROR, ACE_TEXT ("Says .exe not needed for %s\n"), + newname)); + ++error_count; + } + else + delete [] newname; +#endif /* ACE_WIN32 */ + + return error_count; +} + + +int +ACE_TMAIN (int, ACE_TCHAR *[]) +{ + ACE_START_TEST (ACE_TEXT ("ACE_Test")); + + int status = 0; + int result; + + if ((result = execname_test ()) != 0) + status = result; + + ACE_END_TEST; + return status; +} diff --git a/tests/ACE_Test.dsp b/tests/ACE_Test.dsp new file mode 100644 index 00000000000..c80a47c413e --- /dev/null +++ b/tests/ACE_Test.dsp @@ -0,0 +1,162 @@ +# Microsoft Developer Studio Project File - Name="ACE_Test" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=ACE_Test - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "ACE_Test.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "ACE_Test.mak" CFG="ACE_Test - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "ACE_Test - Win32 Static Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "ACE_Test - Win32 Static Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ACE_Test - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "ACE_Test - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "ACE_Test - Win32 Static Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Static_Debug"
+# PROP BASE Intermediate_Dir "Static_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Static_Debug"
+# PROP Intermediate_Dir "Static_Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "_DEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386
+# ADD LINK32 acesd.lib advapi32.lib user32.lib /nologo /subsystem:console /debug /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "ACE_Test - Win32 Static Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Static_Release"
+# PROP BASE Intermediate_Dir "Static_Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Static_Release"
+# PROP Intermediate_Dir "Static_Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D ACE_AS_STATIC_LIBS /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 aces.lib advapi32.lib user32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "ACE_Test - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "../" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ace.lib /nologo /subsystem:console /machine:I386 /libpath:"..\ace"
+
+!ELSEIF "$(CFG)" == "ACE_Test - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir ""
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /I "../" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 aced.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\ace"
+
+!ENDIF
+
+# Begin Target
+
+# Name "ACE_Test - Win32 Static Debug"
+# Name "ACE_Test - Win32 Static Release"
+# Name "ACE_Test - Win32 Release"
+# Name "ACE_Test - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
+# Begin Source File
+
+SOURCE=.\ACE_Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
+# Begin Source File
+
+SOURCE=.\test_config.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
diff --git a/tests/Makefile b/tests/Makefile index e61079f3ba6..e2f577021c2 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,7 +10,8 @@ #---------------------------------------------------------------------------- DIRS_PARALLEL = 1 -BIN = Aio_Platform_Test \ +BIN = ACE_Test \ + Aio_Platform_Test \ Arg_Shifter_Test \ ARGV_Test \ Atomic_Op_Test \ diff --git a/tests/Makefile.bor b/tests/Makefile.bor index 59c411770d7..7c8cb325366 100644 --- a/tests/Makefile.bor +++ b/tests/Makefile.bor @@ -4,6 +4,7 @@ # NAMES = \ + ACE_Test \ Aio_Platform_Test \ Arg_Shifter_Test \ ARGV_Test \ diff --git a/tests/run_test.lst b/tests/run_test.lst index ff225f8dc6b..69d6e02392f 100644 --- a/tests/run_test.lst +++ b/tests/run_test.lst @@ -16,6 +16,7 @@ # configurations. ACE_Init_Test: MSVC +ACE_Test Arg_Shifter_Test Atomic_Op_Test Auto_IncDec_Test diff --git a/tests/tests.dsw b/tests/tests.dsw index 47a6f8d263e..05ad7ad180b 100644 --- a/tests/tests.dsw +++ b/tests/tests.dsw @@ -15,6 +15,18 @@ Package=<4> ###############################################################################
+Project: "ACE_Test"=".\ACE_Test.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "ARGV_Test"=".\ARGV_Test.dsp" - Package Owner=<4>
Package=<5>
diff --git a/tests/tests.mpc b/tests/tests.mpc index d077c53c4a3..4f480670eee 100644 --- a/tests/tests.mpc +++ b/tests/tests.mpc @@ -36,6 +36,15 @@ project(Service Config DLL) : acelib { } } +project(ACE Test) : aceexe { + exename = ACE_Test + Source_Files { + ACE_Test.cpp + } + Header_Files { + } +} + project(Aio Platform Test) : aceexe { exename = Aio_Platform_Test Source_Files { |