|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r68492 - in trunk/libs/icl/test: . fix_icl_after_thread_ fix_include_after_thread_ test_casual_
From: afojgo_at_[hidden]
Date: 2011-01-27 17:29:23
Author: jofaber
Date: 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
New Revision: 68492
URL: http://svn.boost.org/trac/boost/changeset/68492
Log:
Tests to check for the bug fix described in Ticket #5135.
The affected code in boost/icl/type_traits/is_interval.hpp has been fixed before this commit already.
Added:
trunk/libs/icl/test/fix_icl_after_thread_/
trunk/libs/icl/test/fix_icl_after_thread_/fix_icl_after_thread.cpp (contents, props changed)
trunk/libs/icl/test/fix_icl_after_thread_/vc9_fix_icl_after_thread.vcproj (contents, props changed)
trunk/libs/icl/test/fix_include_after_thread_/
trunk/libs/icl/test/fix_include_after_thread_/fix_include_after_thread.cpp (contents, props changed)
trunk/libs/icl/test/fix_include_after_thread_/vc9_fix_include_after_thread.vcproj (contents, props changed)
Text files modified:
trunk/libs/icl/test/Jamfile.v2 | 6 +++++-
trunk/libs/icl/test/test_casual_/test_casual.cpp | 12 +++++-------
trunk/libs/icl/test/vc9_icl_fast_tests.sln | 12 ++++++++++++
3 files changed, 22 insertions(+), 8 deletions(-)
Modified: trunk/libs/icl/test/Jamfile.v2
==============================================================================
--- trunk/libs/icl/test/Jamfile.v2 (original)
+++ trunk/libs/icl/test/Jamfile.v2 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
@@ -1,4 +1,4 @@
-# (C) Copyright 2008-2009: Joachim Faulhaber
+# (C) Copyright 2008-2011: Joachim Faulhaber
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -10,6 +10,7 @@
: requirements
<library>/boost/test//boost_unit_test_framework
<library>/boost/date_time//boost_date_time
+ <library>/boost/thread//boost_thread
<link>static
<include>../../..
;
@@ -59,4 +60,7 @@
# test_combinable is too slow or too large for some compilers
#[ run test_combinable_/test_combinable.cpp ]
[ run test_changing_interval_defaults_/test_changing_interval_defaults.cpp ]
+
+ # Bug fixes --------------------------------------------------------------
+ [ run fix_include_after_thread_/fix_include_after_thread.cpp ]
;
Added: trunk/libs/icl/test/fix_icl_after_thread_/fix_icl_after_thread.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fix_icl_after_thread_/fix_icl_after_thread.cpp 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,35 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2011-2011: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::fix_icl_after_thread unit test
+#include <libs/icl/test/disable_test_warnings.hpp>
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_functions.hpp"
+
+#include <boost/thread.hpp>
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/split_interval_map.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+
+BOOST_AUTO_TEST_CASE(dummy)
+{
+ BOOST_CHECK(true);
+}
+
Added: trunk/libs/icl/test/fix_icl_after_thread_/vc9_fix_icl_after_thread.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fix_icl_after_thread_/vc9_fix_icl_after_thread.vcproj 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fix_icl_after_thread"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA0}"
+ RootNamespace="fix_icl_after_thread"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fix_icl_after_thread.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: trunk/libs/icl/test/fix_include_after_thread_/fix_include_after_thread.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fix_include_after_thread_/fix_include_after_thread.cpp 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,41 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2011-2011: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::fix_include_after_thread unit test
+#include <boost/config.hpp>
+#include <boost/test/unit_test.hpp>
+
+//Problem: If <boost/thread.hpp> is included before this
+//example code, it influences compilation: Code that has
+//compiled well, produces a syntax error error C2059 under
+//msvc-9/10. This can be fixed by enclosing subexpressions
+//like some_attribute<Type>::value in parentheses
+// ->(some_attribute<Type>::value)
+//The problem does not occur for gcc compilers.
+#include <boost/thread.hpp>
+//--- included code ---------------------------------------
+template <class Type> struct some_attribute
+{
+ BOOST_STATIC_CONSTANT(int, value = 0);
+};
+
+template <class Type> struct some_predicate
+{
+ BOOST_STATIC_CONSTANT(bool,
+ value = ((some_attribute<Type>::value) < 0)
+ // value = ( some_attribute<Type>::value < 0)
+ //error C2059: syntax error : ')' ONLY
+ //IF <boost/thread.hpp> is included before
+ );
+};
+//--- end of included code --------------------------------
+
+BOOST_AUTO_TEST_CASE(dummy)
+{
+ BOOST_CHECK(true);
+}
+
Added: trunk/libs/icl/test/fix_include_after_thread_/vc9_fix_include_after_thread.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fix_include_after_thread_/vc9_fix_include_after_thread.vcproj 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fix_include_after_thread"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA0}"
+ RootNamespace="fix_include_after_thread"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fix_include_after_thread.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_interval_map_shared.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: trunk/libs/icl/test/test_casual_/test_casual.cpp
==============================================================================
--- trunk/libs/icl/test/test_casual_/test_casual.cpp (original)
+++ trunk/libs/icl/test/test_casual_/test_casual.cpp 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
@@ -24,15 +24,13 @@
using namespace unit_test;
using namespace boost::icl;
-
-
BOOST_AUTO_TEST_CASE(casual)
{
- typedef int T;
- typedef int U;
- typedef interval_map<T,U, total_absorber> IntervalMapT;
- typedef interval_set<T> IntervalSetT;
- typedef IntervalMapT::interval_type IntervalT;
+ //typedef int T;
+ //typedef int U;
+ //typedef interval_map<T,U, total_absorber> IntervalMapT;
+ //typedef interval_set<T> IntervalSetT;
+ //typedef IntervalMapT::interval_type IntervalT;
BOOST_CHECK_EQUAL(true, true);
}
Modified: trunk/libs/icl/test/vc9_icl_fast_tests.sln
==============================================================================
--- trunk/libs/icl/test/vc9_icl_fast_tests.sln (original)
+++ trunk/libs/icl/test/vc9_icl_fast_tests.sln 2011-01-27 17:29:16 EST (Thu, 27 Jan 2011)
@@ -53,6 +53,10 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_changing_interval_defaults", "test_changing_interval_defaults_\vc9_test_changing_interval_defalts.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fix_include_after_thread", "fix_include_after_thread_\vc9_fix_include_after_thread.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA0}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_fix_icl_after_thread", "fix_icl_after_thread_\vc9_fix_icl_after_thread.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA0}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -163,6 +167,14 @@
{EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}.Debug|Win32.Build.0 = Debug|Win32
{EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}.Release|Win32.ActiveCfg = Release|Win32
{EE61B7EF-EC45-4165-8B49-FD5B8D8A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA0}.Debug|Win32.Build.0 = Debug|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA0}.Release|Win32.ActiveCfg = Release|Win32
+ {EE61B7EF-EC45-4165-8B49-FD5B8D9A9FA0}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk