$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r68588 - in trunk/libs/icl/test: . cmp_clang_ttp_passing_ cmp_msvc_value_born_error_
From: afojgo_at_[hidden]
Date: 2011-01-31 16:13:22
Author: jofaber
Date: 2011-01-31 16:13:17 EST (Mon, 31 Jan 2011)
New Revision: 68588
URL: http://svn.boost.org/trac/boost/changeset/68588
Log:
Added compiler specific tests to look for compiler flaws on all available platforms.
Added:
   trunk/libs/icl/test/cmp_clang_ttp_passing_/
   trunk/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp   (contents, props changed)
   trunk/libs/icl/test/cmp_clang_ttp_passing_/vc9_cmp_clang_ttp_passing.vcproj   (contents, props changed)
   trunk/libs/icl/test/cmp_msvc_value_born_error_/
   trunk/libs/icl/test/cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp   (contents, props changed)
Text files modified: 
   trunk/libs/icl/test/Jamfile.v2             |     7 ++++++-                                 
   trunk/libs/icl/test/vc9_icl_fast_tests.sln |    12 ++++++++++++                            
   2 files changed, 18 insertions(+), 1 deletions(-)
Modified: trunk/libs/icl/test/Jamfile.v2
==============================================================================
--- trunk/libs/icl/test/Jamfile.v2	(original)
+++ trunk/libs/icl/test/Jamfile.v2	2011-01-31 16:13:17 EST (Mon, 31 Jan 2011)
@@ -63,5 +63,10 @@
       
       # Bug fixes --------------------------------------------------------------
       [ run fix_include_after_thread_/fix_include_after_thread.cpp ]   
-      [ run fix_icl_after_thread_/fix_icl_after_thread.cpp ]   
+      [ run fix_icl_after_thread_/fix_icl_after_thread.cpp ] 
+      
+      # Check for compiler bugs ------------------------------------------------
+      # compile-fail-tests  
+      [ run cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp ]   
+      [ run cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp ]   
     ;
Added: trunk/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/cmp_clang_ttp_passing_/cmp_clang_ttp_passing.cpp	2011-01-31 16:13:17 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,45 @@
+/*-----------------------------------------------------------------------------+    
+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::cmp_clang_ttp_passing unit test
+#include <libs/icl/test/disable_test_warnings.hpp>
+#include <boost/config.hpp>
+#include "../unit_test_unwarned.hpp"
+
+
+namespace sep
+{
+
+template<class T>class less{};
+
+template
+<
+	class T, 
+    template<class>class less_T = sep::less
+>
+class cont{};
+
+template
+<
+	class T, 
+    template<class T2, 
+	template<class>class less_T2 = sep::less>class Cont
+>
+void func()
+{
+	typedef Cont<T> cont_type; 
+}
+
+}//namespace sep
+
+
+BOOST_AUTO_TEST_CASE(dummy)
+{
+	sep::func<int, sep::cont>();
+	BOOST_CHECK( true );
+}
+
Added: trunk/libs/icl/test/cmp_clang_ttp_passing_/vc9_cmp_clang_ttp_passing.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/cmp_clang_ttp_passing_/vc9_cmp_clang_ttp_passing.vcproj	2011-01-31 16:13:17 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,210 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9,00"
+	Name="vc9_cmp_clang_ttp_passing"
+	ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}"
+	RootNamespace="cmp_clang_ttp_passing"
+	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=".\cmp_clang_ttp_passing.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/cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/cmp_msvc_value_born_error_/cmp_msvc_value_born_error.cpp	2011-01-31 16:13:17 EST (Mon, 31 Jan 2011)
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------------------------+    
+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::cmp_msvc_value_born_error unit test
+#include <boost/config.hpp>
+#include "../unit_test_unwarned.hpp"
+
+namespace unhelpful{
+	// This declaration of a class template will cause
+	// the compilation of line 17 to fail with syntax error C2059
+    template<class T> class value{};
+}
+
+//--- affected code ---------------------------------------
+template <class Type> struct meta_attribute
+{ 
+    BOOST_STATIC_CONSTANT(int, value = 0); 
+};
+
+template <class Type> struct meta_predicate
+{ 
+    BOOST_STATIC_CONSTANT(bool, value = 
+        ( meta_attribute<Type>::value  < 1)
+        //error C2059: syntax error : ')'
+        //IF class template value declared before
+    //  ((meta_attribute<Type>::value) < 1) // Remedy#1 enclose into ()
+    //  ( meta_attribute<Type>::value  <=0) // Remedy#2 use operator <= 
+        );
+};
+
+BOOST_AUTO_TEST_CASE(dummy)
+{
+	BOOST_CHECK( meta_predicate<int>::value );
+}
+
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-31 16:13:17 EST (Mon, 31 Jan 2011)
@@ -57,6 +57,10 @@
 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
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_cmp_msvc_value_born_error", "cmp_msvc_value_born_error_\vc9_cmp_msvc_value_born_error.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_cmp_clang_ttp_passing", "cmp_clang_ttp_passing_\vc9_cmp_clang_ttp_passing.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -175,6 +179,14 @@
                 {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
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA1}.Debug|Win32.Build.0 = Debug|Win32
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA1}.Release|Win32.ActiveCfg = Release|Win32
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA1}.Release|Win32.Build.0 = Release|Win32
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}.Debug|Win32.Build.0 = Debug|Win32
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}.Release|Win32.ActiveCfg = Release|Win32
+		{EE61B7EF-EC45-4165-8B49-FD5B8D7A9FA2}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE