From 21ec9496541f41f6e7184122d18d0744e0b75dbe Mon Sep 17 00:00:00 2001 From: Beman Dawes Date: Wed, 18 Apr 2012 01:31:53 +0000 Subject: [PATCH] filesystem testing change: use by default, define BOOST_LIGHTWEIGHT_MAIN to use . This gives us the better exception reporting of but provides easy fallback to if desired. [SVN r78057] --- example/file_status.cpp | 7 +++- test/Jamfile.v2 | 1 + test/convenience_test.cpp | 8 ++++- test/deprecated_test.cpp | 7 +++- test/long_path_test.cpp | 7 +++- .../convenience_test/convenience_test.vcxproj | 3 ++ .../deprecated_test/deprecated_test.vcxproj | 3 ++ test/msvc10/file_status/file_status.vcxproj | 3 ++ test/msvc10/filesystem-v3.sln | 35 +++++++++++++++++++ .../long_path_test/long_path_test.vcxproj | 3 ++ .../operations_test/operations_test.vcxproj | 3 ++ .../operations_unit_test.vcxproj | 3 ++ test/msvc10/path_test/path_test.vcxproj | 3 ++ .../path_test_static/path_test_static.vcxproj | 3 ++ .../path_unit_test/path_unit_test.vcxproj | 3 ++ .../windows_attributes.vcxproj | 3 ++ test/operations_test.cpp | 7 +++- test/operations_unit_test.cpp | 8 ++++- test/path_test.cpp | 7 +++- test/path_unit_test.cpp | 8 ++++- test/windows_attributes.cpp | 8 ++++- 21 files changed, 124 insertions(+), 9 deletions(-) diff --git a/example/file_status.cpp b/example/file_status.cpp index 5d3774f..e468875 100644 --- a/example/file_status.cpp +++ b/example/file_status.cpp @@ -11,7 +11,12 @@ #include #include #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif using std::cout; using std::endl; using namespace boost::filesystem; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 45db92c..05173e6 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -8,6 +8,7 @@ project : requirements /boost/filesystem//boost_filesystem /boost/system//boost_system + /boost/test//boost_prg_exec_monitor msvc:on ; diff --git a/test/convenience_test.cpp b/test/convenience_test.cpp index b24008f..5601769 100644 --- a/test/convenience_test.cpp +++ b/test/convenience_test.cpp @@ -26,7 +26,13 @@ # endif #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif + #include #include #include diff --git a/test/deprecated_test.cpp b/test/deprecated_test.cpp index c3cacfc..60f8349 100644 --- a/test/deprecated_test.cpp +++ b/test/deprecated_test.cpp @@ -21,7 +21,12 @@ # endif #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif namespace fs = boost::filesystem; using boost::filesystem::path; diff --git a/test/long_path_test.cpp b/test/long_path_test.cpp index fd4a7fc..b6b9f66 100644 --- a/test/long_path_test.cpp +++ b/test/long_path_test.cpp @@ -18,7 +18,12 @@ using namespace boost::filesystem; #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif namespace { diff --git a/test/msvc10/convenience_test/convenience_test.vcxproj b/test/msvc10/convenience_test/convenience_test.vcxproj index 437ebf6..48bfef9 100644 --- a/test/msvc10/convenience_test/convenience_test.vcxproj +++ b/test/msvc10/convenience_test/convenience_test.vcxproj @@ -92,6 +92,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} false diff --git a/test/msvc10/deprecated_test/deprecated_test.vcxproj b/test/msvc10/deprecated_test/deprecated_test.vcxproj index c16b177..efde5a7 100644 --- a/test/msvc10/deprecated_test/deprecated_test.vcxproj +++ b/test/msvc10/deprecated_test/deprecated_test.vcxproj @@ -92,6 +92,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} false diff --git a/test/msvc10/file_status/file_status.vcxproj b/test/msvc10/file_status/file_status.vcxproj index dc8adc2..3f9956e 100644 --- a/test/msvc10/file_status/file_status.vcxproj +++ b/test/msvc10/file_status/file_status.vcxproj @@ -87,6 +87,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} diff --git a/test/msvc10/filesystem-v3.sln b/test/msvc10/filesystem-v3.sln index 5c69a70..770ab97 100644 --- a/test/msvc10/filesystem-v3.sln +++ b/test/msvc10/filesystem-v3.sln @@ -2,12 +2,18 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_unit_test", "path_unit_test\path_unit_test.vcxproj", "{3C77F610-2E31-4087-9DF2-7CD45198A02D}" + ProjectSection(ProjectDependencies) = postProject + {0EA788CA-FA52-4290-A4D0-F616390B203B} = {0EA788CA-FA52-4290-A4D0-F616390B203B} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "operations_unit_test", "operations_unit_test\operations_unit_test.vcxproj", "{5DAF595A-4640-4F86-8A5F-E54E3E4CE7D0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "operations_test", "operations_test\operations_test.vcxproj", "{8BB7E604-46EF-42BE-ABB5-D7044B3E8A40}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_test", "path_test\path_test.vcxproj", "{F3D230C4-9185-4C2B-AB0E-0F0D28D8268C}" + ProjectSection(ProjectDependencies) = postProject + {0EA788CA-FA52-4290-A4D0-F616390B203B} = {0EA788CA-FA52-4290-A4D0-F616390B203B} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "system_dll", "system_dll\system_dll.vcxproj", "{F94CCADD-A90B-480C-A304-C19D015D36B1}" EndProject @@ -28,6 +34,9 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut4", "tut4\tut4.vcxproj", "{256EA89A-E073-4CE8-B675-BE2FBC6B2691}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "windows_attributes", "windows_attributes\windows_attributes.vcxproj", "{FC5C770F-3017-4021-8DAF-C5DCA3FDF005}" + ProjectSection(ProjectDependencies) = postProject + {0EA788CA-FA52-4290-A4D0-F616390B203B} = {0EA788CA-FA52-4290-A4D0-F616390B203B} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tut5", "tut5\tut5.vcxproj", "{5C9B3380-3C6E-45CC-986A-16D245E27E58}" ProjectSection(ProjectDependencies) = postProject @@ -89,6 +98,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "filesystem_lib", "filesyste EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "path_test_static", "path_test_static\path_test_static.vcxproj", "{3B3010C5-D6D7-4320-A992-4EA61F256279}" + ProjectSection(ProjectDependencies) = postProject + {272DFC15-6292-49DF-B457-6784A183EAC3} = {272DFC15-6292-49DF-B457-6784A183EAC3} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ticket_test", "ticket_test\ticket_test.vcxproj", "{AD2B00B7-D2CB-47B9-B6BA-15652188E072}" + ProjectSection(ProjectDependencies) = postProject + {0EA788CA-FA52-4290-A4D0-F616390B203B} = {0EA788CA-FA52-4290-A4D0-F616390B203B} + {F94CCADD-A90B-480C-A304-C19D015D36B1} = {F94CCADD-A90B-480C-A304-C19D015D36B1} + {FFD738F7-96F0-445C-81EA-551665EF53D1} = {FFD738F7-96F0-445C-81EA-551665EF53D1} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exec_monitor_dll", "exec_monitor_dll\exec_monitor_dll.vcxproj", "{0EA788CA-FA52-4290-A4D0-F616390B203B}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exec_monitor_lib", "exec_monitor_lib\exec_monitor_lib.vcxproj", "{272DFC15-6292-49DF-B457-6784A183EAC3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -204,6 +227,18 @@ Global {3B3010C5-D6D7-4320-A992-4EA61F256279}.Debug|Win32.Build.0 = Debug|Win32 {3B3010C5-D6D7-4320-A992-4EA61F256279}.Release|Win32.ActiveCfg = Release|Win32 {3B3010C5-D6D7-4320-A992-4EA61F256279}.Release|Win32.Build.0 = Release|Win32 + {AD2B00B7-D2CB-47B9-B6BA-15652188E072}.Debug|Win32.ActiveCfg = Debug|Win32 + {AD2B00B7-D2CB-47B9-B6BA-15652188E072}.Debug|Win32.Build.0 = Debug|Win32 + {AD2B00B7-D2CB-47B9-B6BA-15652188E072}.Release|Win32.ActiveCfg = Release|Win32 + {AD2B00B7-D2CB-47B9-B6BA-15652188E072}.Release|Win32.Build.0 = Release|Win32 + {0EA788CA-FA52-4290-A4D0-F616390B203B}.Debug|Win32.ActiveCfg = Debug|Win32 + {0EA788CA-FA52-4290-A4D0-F616390B203B}.Debug|Win32.Build.0 = Debug|Win32 + {0EA788CA-FA52-4290-A4D0-F616390B203B}.Release|Win32.ActiveCfg = Release|Win32 + {0EA788CA-FA52-4290-A4D0-F616390B203B}.Release|Win32.Build.0 = Release|Win32 + {272DFC15-6292-49DF-B457-6784A183EAC3}.Debug|Win32.ActiveCfg = Debug|Win32 + {272DFC15-6292-49DF-B457-6784A183EAC3}.Debug|Win32.Build.0 = Debug|Win32 + {272DFC15-6292-49DF-B457-6784A183EAC3}.Release|Win32.ActiveCfg = Release|Win32 + {272DFC15-6292-49DF-B457-6784A183EAC3}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/test/msvc10/long_path_test/long_path_test.vcxproj b/test/msvc10/long_path_test/long_path_test.vcxproj index c8cc191..db48580 100644 --- a/test/msvc10/long_path_test/long_path_test.vcxproj +++ b/test/msvc10/long_path_test/long_path_test.vcxproj @@ -87,6 +87,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} diff --git a/test/msvc10/operations_test/operations_test.vcxproj b/test/msvc10/operations_test/operations_test.vcxproj index b7bd47a..429fb35 100644 --- a/test/msvc10/operations_test/operations_test.vcxproj +++ b/test/msvc10/operations_test/operations_test.vcxproj @@ -91,6 +91,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} false diff --git a/test/msvc10/operations_unit_test/operations_unit_test.vcxproj b/test/msvc10/operations_unit_test/operations_unit_test.vcxproj index 2bc35c3..c4b7045 100644 --- a/test/msvc10/operations_unit_test/operations_unit_test.vcxproj +++ b/test/msvc10/operations_unit_test/operations_unit_test.vcxproj @@ -94,6 +94,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} false diff --git a/test/msvc10/path_test/path_test.vcxproj b/test/msvc10/path_test/path_test.vcxproj index 9f26984..6942a56 100644 --- a/test/msvc10/path_test/path_test.vcxproj +++ b/test/msvc10/path_test/path_test.vcxproj @@ -92,6 +92,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} false diff --git a/test/msvc10/path_test_static/path_test_static.vcxproj b/test/msvc10/path_test_static/path_test_static.vcxproj index 4121f26..8aa26c6 100644 --- a/test/msvc10/path_test_static/path_test_static.vcxproj +++ b/test/msvc10/path_test_static/path_test_static.vcxproj @@ -91,6 +91,9 @@ + + {272dfc15-6292-49df-b457-6784a183eac3} + {2c1770a4-4ac3-4102-9d36-e652dbb686d8} diff --git a/test/msvc10/path_unit_test/path_unit_test.vcxproj b/test/msvc10/path_unit_test/path_unit_test.vcxproj index c1203bb..d7127c9 100644 --- a/test/msvc10/path_unit_test/path_unit_test.vcxproj +++ b/test/msvc10/path_unit_test/path_unit_test.vcxproj @@ -92,6 +92,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} false diff --git a/test/msvc10/windows_attributes/windows_attributes.vcxproj b/test/msvc10/windows_attributes/windows_attributes.vcxproj index cd0e68e..9be3bcf 100644 --- a/test/msvc10/windows_attributes/windows_attributes.vcxproj +++ b/test/msvc10/windows_attributes/windows_attributes.vcxproj @@ -79,6 +79,9 @@ + + {0ea788ca-fa52-4290-a4d0-f616390b203b} + {ffd738f7-96f0-445c-81ea-551665ef53d1} diff --git a/test/operations_test.cpp b/test/operations_test.cpp index 0f94149..03bed62 100644 --- a/test/operations_test.cpp +++ b/test/operations_test.cpp @@ -26,7 +26,12 @@ #include #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif namespace fs = boost::filesystem; using boost::system::error_code; diff --git a/test/operations_unit_test.cpp b/test/operations_unit_test.cpp index b4c7f69..8d7ef85 100644 --- a/test/operations_unit_test.cpp +++ b/test/operations_unit_test.cpp @@ -33,7 +33,13 @@ #include #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif + #include using namespace boost::filesystem; diff --git a/test/path_test.cpp b/test/path_test.cpp index 6b7bde6..018960b 100644 --- a/test/path_test.cpp +++ b/test/path_test.cpp @@ -64,7 +64,12 @@ #include #include #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif namespace fs = boost::filesystem; using boost::filesystem::path; diff --git a/test/path_unit_test.cpp b/test/path_unit_test.cpp index 3c8db45..3657472 100644 --- a/test/path_unit_test.cpp +++ b/test/path_unit_test.cpp @@ -34,7 +34,13 @@ #include // for imbue tests #include "test_codecvt.hpp" // for codecvt arg tests #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif + #include // used constructor tests #include diff --git a/test/windows_attributes.cpp b/test/windows_attributes.cpp index e1a686c..cc9ec80 100644 --- a/test/windows_attributes.cpp +++ b/test/windows_attributes.cpp @@ -14,7 +14,13 @@ //--------------------------------------------------------------------------------------// #include -#include + +#ifndef BOOST_LIGHTWEIGHT_MAIN +# include +#else +# include +#endif + #include #include #include