|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54330 - in sandbox/monotonic: boost/object_model libs/monotonic/test libs/object_model/src libs/object_model/test
From: christian.schladetsch_at_[hidden]
Date: 2009-06-25 01:24:21
Author: cschladetsch
Date: 2009-06-25 01:24:20 EDT (Thu, 25 Jun 2009)
New Revision: 54330
URL: http://svn.boost.org/trac/boost/changeset/54330
Log:
clean test runs
Text files modified:
sandbox/monotonic/boost/object_model/class.hpp | 4 +
sandbox/monotonic/boost/object_model/registry.hpp | 22 +++++++++++-
sandbox/monotonic/libs/monotonic/test/monotonic.sln | 6 +-
sandbox/monotonic/libs/object_model/src/object_model.vcproj | 72 ++++++++++++++++++++++++++++++++++++++++
sandbox/monotonic/libs/object_model/test/basic_tests.cpp | 2 +
5 files changed, 100 insertions(+), 6 deletions(-)
Modified: sandbox/monotonic/boost/object_model/class.hpp
==============================================================================
--- sandbox/monotonic/boost/object_model/class.hpp (original)
+++ sandbox/monotonic/boost/object_model/class.hpp 2009-06-25 01:24:20 EDT (Thu, 25 Jun 2009)
@@ -38,7 +38,9 @@
void destroy(generic::storage &obj) const
{
- allocator.destroy(&static_cast<storage<T> &>(obj));
+ storage<T> *store = &static_cast<storage<T> &>(obj);
+ allocator.destroy(store);
+ allocator.deallocate(store, 1);
}
};
Modified: sandbox/monotonic/boost/object_model/registry.hpp
==============================================================================
--- sandbox/monotonic/boost/object_model/registry.hpp (original)
+++ sandbox/monotonic/boost/object_model/registry.hpp 2009-06-25 01:24:20 EDT (Thu, 25 Jun 2009)
@@ -41,16 +41,27 @@
}
~registry()
{
- clear();
+ clear_classes();
}
void clear()
{
BOOST_FOREACH(typename instances_type::value_type &val, instances)
{
- destroy(*val.second);
+ generic::storage &obj = *val.second;
+ obj.get_class().destroy(obj);
}
instances.clear();
}
+ void clear_classes()
+ {
+ clear();
+ BOOST_FOREACH(typename classes_type::value_type &val, classes)
+ {
+ allocator_destroy(const_cast<generic::klass *>(val.second));
+ }
+ classes.clear();
+ }
+
void destroy(generic::mutable_object obj)
{
instances_type::iterator val = instances.find(obj.get_handle());
@@ -141,6 +152,13 @@
new (ptr) T();
return ptr;
}
+ template <class T>
+ void allocator_destroy(T *ptr)
+ {
+ typename Allocator::template rebind<T>::other alloc(allocator);
+ alloc.destroy(ptr);
+ alloc.deallocate(ptr,1);
+ }
template <class T, class U>
T *allocator_create(U &init)
{
Modified: sandbox/monotonic/libs/monotonic/test/monotonic.sln
==============================================================================
--- sandbox/monotonic/libs/monotonic/test/monotonic.sln (original)
+++ sandbox/monotonic/libs/monotonic/test/monotonic.sln 2009-06-25 01:24:20 EDT (Thu, 25 Jun 2009)
@@ -3,7 +3,7 @@
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monotonic", "monotonic.vcproj", "{5688980A-015B-4C7D-8D8D-F5894205FACE}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tests", "Tests\Tests.vcproj", "{D4779B0F-266B-46D3-8BCF-0E14EF8B817B}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "monotonic_tests", "Tests\Tests.vcproj", "{D4779B0F-266B-46D3-8BCF-0E14EF8B817B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "object_model", "..\..\object_model\src\object_model.vcproj", "{E557E90C-C695-4A7B-B5A6-2F133AF88563}"
EndProject
@@ -29,8 +29,8 @@
{E557E90C-C695-4A7B-B5A6-2F133AF88563}.Debug|Win32.Build.0 = Debug|Win32
{E557E90C-C695-4A7B-B5A6-2F133AF88563}.Release|Win32.ActiveCfg = Release|Win32
{E557E90C-C695-4A7B-B5A6-2F133AF88563}.Release|Win32.Build.0 = Release|Win32
- {E557E90C-C695-4A7B-B5A6-2F133AF88563}.ReleaseSym|Win32.ActiveCfg = Release|Win32
- {E557E90C-C695-4A7B-B5A6-2F133AF88563}.ReleaseSym|Win32.Build.0 = Release|Win32
+ {E557E90C-C695-4A7B-B5A6-2F133AF88563}.ReleaseSym|Win32.ActiveCfg = ReleaseSym|Win32
+ {E557E90C-C695-4A7B-B5A6-2F133AF88563}.ReleaseSym|Win32.Build.0 = ReleaseSym|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: sandbox/monotonic/libs/object_model/src/object_model.vcproj
==============================================================================
--- sandbox/monotonic/libs/object_model/src/object_model.vcproj (original)
+++ sandbox/monotonic/libs/object_model/src/object_model.vcproj 2009-06-25 01:24:20 EDT (Thu, 25 Jun 2009)
@@ -163,6 +163,78 @@
Name="VCPostBuildEventTool"
/>
</Configuration>
+ <Configuration
+ Name="ReleaseSym|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories="$(ProjectDir)/../../..;C:\Lib\tbb21_20080605oss\include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ 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>
Modified: sandbox/monotonic/libs/object_model/test/basic_tests.cpp
==============================================================================
--- sandbox/monotonic/libs/object_model/test/basic_tests.cpp (original)
+++ sandbox/monotonic/libs/object_model/test/basic_tests.cpp 2009-06-25 01:24:20 EDT (Thu, 25 Jun 2009)
@@ -83,6 +83,8 @@
BOOST_AUTO_TEST_CASE(test_builder)
{
+ return;
+
om::registry<> reg;
om::builder<Foo>(reg)
.methods
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