|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72103 - in sandbox/endian: boost/endian libs/endian/example libs/endian/test libs/endian/test/endian-in-sandbox
From: bdawes_at_[hidden]
Date: 2011-05-22 16:33:29
Author: bemandawes
Date: 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
New Revision: 72103
URL: http://svn.boost.org/trac/boost/changeset/72103
Log:
Reflect renaming and path changes
Text files modified:
sandbox/endian/boost/endian/cover_operators.hpp | 4
sandbox/endian/boost/endian/integers.hpp | 6
sandbox/endian/libs/endian/example/endian_example.cpp | 7
sandbox/endian/libs/endian/test/endian-in-sandbox/endian-in-sandbox.sln | 6 -
sandbox/endian/libs/endian/test/endian_in_union_test.cpp | 7
sandbox/endian/libs/endian/test/endian_operations_test.cpp | 235 ++++++++++++++++++++-------------------
sandbox/endian/libs/endian/test/endian_test.cpp | 7
7 files changed, 135 insertions(+), 137 deletions(-)
Modified: sandbox/endian/boost/endian/cover_operators.hpp
==============================================================================
--- sandbox/endian/boost/endian/cover_operators.hpp (original)
+++ sandbox/endian/boost/endian/cover_operators.hpp 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
@@ -27,7 +27,7 @@
namespace boost
{
- namespace integer
+ namespace endian
{
// A class that adds integer operators to an integer cover class
@@ -105,7 +105,7 @@
}
# endif
};
- } // namespace integer
+ } // namespace endian
} // namespace boost
#endif // BOOST_INTEGER_COVER_OPERATORS_HPP
Modified: sandbox/endian/boost/endian/integers.hpp
==============================================================================
--- sandbox/endian/boost/endian/integers.hpp (original)
+++ sandbox/endian/boost/endian/integers.hpp 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
@@ -33,7 +33,7 @@
#include <boost/detail/endian.hpp>
#define BOOST_MINIMAL_INTEGER_COVER_OPERATORS
#define BOOST_NO_IO_COVER_OPERATORS
-#include <boost/integer/cover_operators.hpp>
+#include <boost/endian/cover_operators.hpp>
#undef BOOST_NO_IO_COVER_OPERATORS
#undef BOOST_MINIMAL_INTEGER_COVER_OPERATORS
#include <boost/type_traits/is_signed.hpp>
@@ -148,7 +148,7 @@
} // namespace detail
- namespace integer
+ namespace endian
{
# ifdef BOOST_ENDIAN_LOG
@@ -421,7 +421,7 @@
typedef endian< endianness::little, uint64_t, 64, alignment::aligned > aligned_ulittle64_t;
# endif
- } // namespace integer
+ } // namespace endian
} // namespace boost
#if defined(__BORLANDC__) || defined( __CODEGEARC__)
Modified: sandbox/endian/libs/endian/example/endian_example.cpp
==============================================================================
--- sandbox/endian/libs/endian/example/endian_example.cpp (original)
+++ sandbox/endian/libs/endian/example/endian_example.cpp 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
@@ -14,9 +14,10 @@
#include <iostream>
#include <cassert>
#include <cstdio>
-#include <boost/integer/endian.hpp>
+#include <boost/endian/integers.hpp>
+#include <boost/detail/lightweight_main.hpp>
-using namespace boost::integer;
+using namespace boost::endian;
namespace
{
@@ -36,7 +37,7 @@
const char * filename = "test.dat";
}
-int main()
+int cpp_main(int, char * [])
{
assert( sizeof( header ) == 16 ); // requirement for interoperability
Modified: sandbox/endian/libs/endian/test/endian-in-sandbox/endian-in-sandbox.sln
==============================================================================
--- sandbox/endian/libs/endian/test/endian-in-sandbox/endian-in-sandbox.sln (original)
+++ sandbox/endian/libs/endian/test/endian-in-sandbox/endian-in-sandbox.sln 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
@@ -17,8 +17,6 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "endian_binary_stream_test", "endian_binary_stream_test\endian_binary_stream_test.vcxproj", "{AD46E04C-C1E1-446E-8D5F-E11B6C438181}"
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "endian_flip_test", "endian_flip_test\endian_flip_test.vcxproj", "{9FA33B0B-2B00-49E8-A892-E049D86076A9}"
-EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "binary_stream_example", "binary_stream_example\binary_stream_example.vcxproj", "{06736C67-6305-4A9F-8D10-850FD0CE907D}"
EndProject
Global
@@ -59,10 +57,6 @@
{AD46E04C-C1E1-446E-8D5F-E11B6C438181}.Debug|Win32.Build.0 = Debug|Win32
{AD46E04C-C1E1-446E-8D5F-E11B6C438181}.Release|Win32.ActiveCfg = Release|Win32
{AD46E04C-C1E1-446E-8D5F-E11B6C438181}.Release|Win32.Build.0 = Release|Win32
- {9FA33B0B-2B00-49E8-A892-E049D86076A9}.Debug|Win32.ActiveCfg = Debug|Win32
- {9FA33B0B-2B00-49E8-A892-E049D86076A9}.Debug|Win32.Build.0 = Debug|Win32
- {9FA33B0B-2B00-49E8-A892-E049D86076A9}.Release|Win32.ActiveCfg = Release|Win32
- {9FA33B0B-2B00-49E8-A892-E049D86076A9}.Release|Win32.Build.0 = Release|Win32
{06736C67-6305-4A9F-8D10-850FD0CE907D}.Debug|Win32.ActiveCfg = Debug|Win32
{06736C67-6305-4A9F-8D10-850FD0CE907D}.Debug|Win32.Build.0 = Debug|Win32
{06736C67-6305-4A9F-8D10-850FD0CE907D}.Release|Win32.ActiveCfg = Release|Win32
Modified: sandbox/endian/libs/endian/test/endian_in_union_test.cpp
==============================================================================
--- sandbox/endian/libs/endian/test/endian_in_union_test.cpp (original)
+++ sandbox/endian/libs/endian/test/endian_in_union_test.cpp 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
@@ -11,10 +11,11 @@
#define BOOST_ENDIAN_FORCE_PODNESS
-#include <boost/integer/endian.hpp>
+#include <boost/endian/integers.hpp>
+#include <boost/detail/lightweight_main.hpp>
#include <cassert>
-using namespace boost::integer;
+using namespace boost::endian;
union U
{
@@ -75,7 +76,7 @@
U foo;
-int main()
+int cpp_main(int, char * [])
{
return 0;
Modified: sandbox/endian/libs/endian/test/endian_operations_test.cpp
==============================================================================
--- sandbox/endian/libs/endian/test/endian_operations_test.cpp (original)
+++ sandbox/endian/libs/endian/test/endian_operations_test.cpp 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
@@ -18,11 +18,12 @@
#define BOOST_ENDIAN_LOG
-#include <boost/integer/endian.hpp>
+#include <boost/endian/integers.hpp>
+#include <boost/detail/lightweight_main.hpp>
#include <cassert>
#include <iostream>
-namespace bi = boost::integer;
+namespace be = boost::endian;
#ifdef _MSC_VER
# pragma warning( disable : 4244 ) // conversion ..., possible loss of data
@@ -127,8 +128,8 @@
#ifdef BOOST_SHORT_ENDIAN_TEST
Test<T1, int>::test();
Test<T1, unsigned int>::test();
- Test<T1, bi::big16_t>::test();
- Test<T1, bi::ubig64_t>::test();
+ Test<T1, be::big16_t>::test();
+ Test<T1, be::ubig64_t>::test();
#else
Test<T1, char>::test();
Test<T1, unsigned char>::test();
@@ -141,54 +142,54 @@
Test<T1, unsigned long>::test();
Test<T1, long long>::test();
Test<T1, unsigned long long>::test();
- Test<T1, bi::big8_t>::test();
- Test<T1, bi::big16_t>::test();
- Test<T1, bi::big24_t>::test();
- Test<T1, bi::big32_t>::test();
- Test<T1, bi::big40_t>::test();
- Test<T1, bi::big48_t>::test();
- Test<T1, bi::big56_t>::test();
- Test<T1, bi::big64_t>::test();
- Test<T1, bi::ubig8_t>::test();
- Test<T1, bi::ubig16_t>::test();
- Test<T1, bi::ubig24_t>::test();
- Test<T1, bi::ubig32_t>::test();
- Test<T1, bi::ubig40_t>::test();
- Test<T1, bi::ubig48_t>::test();
- Test<T1, bi::ubig56_t>::test();
- Test<T1, bi::ubig64_t>::test();
- Test<T1, bi::little8_t>::test();
- Test<T1, bi::little16_t>::test();
- Test<T1, bi::little24_t>::test();
- Test<T1, bi::little32_t>::test();
- Test<T1, bi::little40_t>::test();
- Test<T1, bi::little48_t>::test();
- Test<T1, bi::little56_t>::test();
- Test<T1, bi::little64_t>::test();
- Test<T1, bi::ulittle8_t>::test();
- Test<T1, bi::ulittle16_t>::test();
- Test<T1, bi::ulittle24_t>::test();
- Test<T1, bi::ulittle32_t>::test();
- Test<T1, bi::ulittle40_t>::test();
- Test<T1, bi::ulittle48_t>::test();
- Test<T1, bi::ulittle56_t>::test();
- Test<T1, bi::ulittle64_t>::test();
- Test<T1, bi::native8_t>::test();
- Test<T1, bi::native16_t>::test();
- Test<T1, bi::native24_t>::test();
- Test<T1, bi::native32_t>::test();
- Test<T1, bi::native40_t>::test();
- Test<T1, bi::native48_t>::test();
- Test<T1, bi::native56_t>::test();
- Test<T1, bi::native64_t>::test();
- Test<T1, bi::unative8_t>::test();
- Test<T1, bi::unative16_t>::test();
- Test<T1, bi::unative24_t>::test();
- Test<T1, bi::unative32_t>::test();
- Test<T1, bi::unative40_t>::test();
- Test<T1, bi::unative48_t>::test();
- Test<T1, bi::unative56_t>::test();
- Test<T1, bi::unative64_t>::test();
+ Test<T1, be::big8_t>::test();
+ Test<T1, be::big16_t>::test();
+ Test<T1, be::big24_t>::test();
+ Test<T1, be::big32_t>::test();
+ Test<T1, be::big40_t>::test();
+ Test<T1, be::big48_t>::test();
+ Test<T1, be::big56_t>::test();
+ Test<T1, be::big64_t>::test();
+ Test<T1, be::ubig8_t>::test();
+ Test<T1, be::ubig16_t>::test();
+ Test<T1, be::ubig24_t>::test();
+ Test<T1, be::ubig32_t>::test();
+ Test<T1, be::ubig40_t>::test();
+ Test<T1, be::ubig48_t>::test();
+ Test<T1, be::ubig56_t>::test();
+ Test<T1, be::ubig64_t>::test();
+ Test<T1, be::little8_t>::test();
+ Test<T1, be::little16_t>::test();
+ Test<T1, be::little24_t>::test();
+ Test<T1, be::little32_t>::test();
+ Test<T1, be::little40_t>::test();
+ Test<T1, be::little48_t>::test();
+ Test<T1, be::little56_t>::test();
+ Test<T1, be::little64_t>::test();
+ Test<T1, be::ulittle8_t>::test();
+ Test<T1, be::ulittle16_t>::test();
+ Test<T1, be::ulittle24_t>::test();
+ Test<T1, be::ulittle32_t>::test();
+ Test<T1, be::ulittle40_t>::test();
+ Test<T1, be::ulittle48_t>::test();
+ Test<T1, be::ulittle56_t>::test();
+ Test<T1, be::ulittle64_t>::test();
+ Test<T1, be::native8_t>::test();
+ Test<T1, be::native16_t>::test();
+ Test<T1, be::native24_t>::test();
+ Test<T1, be::native32_t>::test();
+ Test<T1, be::native40_t>::test();
+ Test<T1, be::native48_t>::test();
+ Test<T1, be::native56_t>::test();
+ Test<T1, be::native64_t>::test();
+ Test<T1, be::unative8_t>::test();
+ Test<T1, be::unative16_t>::test();
+ Test<T1, be::unative24_t>::test();
+ Test<T1, be::unative32_t>::test();
+ Test<T1, be::unative40_t>::test();
+ Test<T1, be::unative48_t>::test();
+ Test<T1, be::unative56_t>::test();
+ Test<T1, be::unative64_t>::test();
#endif
}
@@ -198,9 +199,9 @@
#ifdef BOOST_SHORT_ENDIAN_TEST
op_test_aux<Test, unsigned short>();
op_test_aux<Test, int>();
- op_test_aux<Test, bi::big32_t>();
- op_test_aux<Test, bi::ubig32_t>();
- op_test_aux<Test, bi::little48_t>();
+ op_test_aux<Test, be::big32_t>();
+ op_test_aux<Test, be::ubig32_t>();
+ op_test_aux<Test, be::little48_t>();
#else
op_test_aux<Test, char>();
op_test_aux<Test, unsigned char>();
@@ -213,79 +214,79 @@
op_test_aux<Test, unsigned long>();
op_test_aux<Test, long long>();
op_test_aux<Test, unsigned long long>();
- op_test_aux<Test, bi::big8_t>();
- op_test_aux<Test, bi::big16_t>();
- op_test_aux<Test, bi::big24_t>();
- op_test_aux<Test, bi::big32_t>();
- op_test_aux<Test, bi::big40_t>();
- op_test_aux<Test, bi::big48_t>();
- op_test_aux<Test, bi::big56_t>();
- op_test_aux<Test, bi::big64_t>();
- op_test_aux<Test, bi::ubig8_t>();
- op_test_aux<Test, bi::ubig16_t>();
- op_test_aux<Test, bi::ubig24_t>();
- op_test_aux<Test, bi::ubig32_t>();
- op_test_aux<Test, bi::ubig40_t>();
- op_test_aux<Test, bi::ubig48_t>();
- op_test_aux<Test, bi::ubig56_t>();
- op_test_aux<Test, bi::ubig64_t>();
- op_test_aux<Test, bi::little8_t>();
- op_test_aux<Test, bi::little16_t>();
- op_test_aux<Test, bi::little24_t>();
- op_test_aux<Test, bi::little32_t>();
- op_test_aux<Test, bi::little40_t>();
- op_test_aux<Test, bi::little48_t>();
- op_test_aux<Test, bi::little56_t>();
- op_test_aux<Test, bi::little64_t>();
- op_test_aux<Test, bi::ulittle8_t>();
- op_test_aux<Test, bi::ulittle16_t>();
- op_test_aux<Test, bi::ulittle24_t>();
- op_test_aux<Test, bi::ulittle32_t>();
- op_test_aux<Test, bi::ulittle40_t>();
- op_test_aux<Test, bi::ulittle48_t>();
- op_test_aux<Test, bi::ulittle56_t>();
- op_test_aux<Test, bi::ulittle64_t>();
- op_test_aux<Test, bi::native8_t>();
- op_test_aux<Test, bi::native16_t>();
- op_test_aux<Test, bi::native24_t>();
- op_test_aux<Test, bi::native32_t>();
- op_test_aux<Test, bi::native40_t>();
- op_test_aux<Test, bi::native48_t>();
- op_test_aux<Test, bi::native56_t>();
- op_test_aux<Test, bi::native64_t>();
- op_test_aux<Test, bi::unative8_t>();
- op_test_aux<Test, bi::unative16_t>();
- op_test_aux<Test, bi::unative24_t>();
- op_test_aux<Test, bi::unative32_t>();
- op_test_aux<Test, bi::unative40_t>();
- op_test_aux<Test, bi::unative48_t>();
- op_test_aux<Test, bi::unative56_t>();
- op_test_aux<Test, bi::unative64_t>();
+ op_test_aux<Test, be::big8_t>();
+ op_test_aux<Test, be::big16_t>();
+ op_test_aux<Test, be::big24_t>();
+ op_test_aux<Test, be::big32_t>();
+ op_test_aux<Test, be::big40_t>();
+ op_test_aux<Test, be::big48_t>();
+ op_test_aux<Test, be::big56_t>();
+ op_test_aux<Test, be::big64_t>();
+ op_test_aux<Test, be::ubig8_t>();
+ op_test_aux<Test, be::ubig16_t>();
+ op_test_aux<Test, be::ubig24_t>();
+ op_test_aux<Test, be::ubig32_t>();
+ op_test_aux<Test, be::ubig40_t>();
+ op_test_aux<Test, be::ubig48_t>();
+ op_test_aux<Test, be::ubig56_t>();
+ op_test_aux<Test, be::ubig64_t>();
+ op_test_aux<Test, be::little8_t>();
+ op_test_aux<Test, be::little16_t>();
+ op_test_aux<Test, be::little24_t>();
+ op_test_aux<Test, be::little32_t>();
+ op_test_aux<Test, be::little40_t>();
+ op_test_aux<Test, be::little48_t>();
+ op_test_aux<Test, be::little56_t>();
+ op_test_aux<Test, be::little64_t>();
+ op_test_aux<Test, be::ulittle8_t>();
+ op_test_aux<Test, be::ulittle16_t>();
+ op_test_aux<Test, be::ulittle24_t>();
+ op_test_aux<Test, be::ulittle32_t>();
+ op_test_aux<Test, be::ulittle40_t>();
+ op_test_aux<Test, be::ulittle48_t>();
+ op_test_aux<Test, be::ulittle56_t>();
+ op_test_aux<Test, be::ulittle64_t>();
+ op_test_aux<Test, be::native8_t>();
+ op_test_aux<Test, be::native16_t>();
+ op_test_aux<Test, be::native24_t>();
+ op_test_aux<Test, be::native32_t>();
+ op_test_aux<Test, be::native40_t>();
+ op_test_aux<Test, be::native48_t>();
+ op_test_aux<Test, be::native56_t>();
+ op_test_aux<Test, be::native64_t>();
+ op_test_aux<Test, be::unative8_t>();
+ op_test_aux<Test, be::unative16_t>();
+ op_test_aux<Test, be::unative24_t>();
+ op_test_aux<Test, be::unative32_t>();
+ op_test_aux<Test, be::unative40_t>();
+ op_test_aux<Test, be::unative48_t>();
+ op_test_aux<Test, be::unative56_t>();
+ op_test_aux<Test, be::unative64_t>();
#endif
}
// main ------------------------------------------------------------------------------//
-int main()
+int cpp_main(int, char * [])
{
- bi::endian_log = false;
+ be::endian_log = false;
// make sure some simple things work
- bi::big32_t o1(1);
- bi::big32_t o2(2L);
- bi::big32_t o3(3LL);
- bi::big64_t o4(1);
+ be::big32_t o1(1);
+ be::big32_t o2(2L);
+ be::big32_t o3(3LL);
+ be::big64_t o4(1);
// use cases; if BOOST_ENDIAN_LOG is defined, will output to clog info on
// what overloads and conversions are actually being performed.
- bi::endian_log = true;
+ be::endian_log = true;
std::clog << "set up test values\n";
- bi::big32_t big(12345);
- bi::ulittle16_t ulittle(10);
- bi::big64_t result;
+ be::big32_t big(12345);
+ be::ulittle16_t ulittle(10);
+ be::big64_t result;
std::clog << "\nresult = +big\n";
@@ -340,19 +341,19 @@
result = 5 * 10;
std::clog << "\n";
- bi::endian_log = false;
+ be::endian_log = false;
// test from Roland Schwarz that detected ambiguities
unsigned u;
- bi::ulittle32_t u1;
- bi::ulittle32_t u2;
+ be::ulittle32_t u1;
+ be::ulittle32_t u2;
u = 1;
u1 = 1;
u2 = u1 + u;
// one more wrinkle
- bi::ulittle16_t u3(3);
+ be::ulittle16_t u3(3);
u3 = 3;
u2 = u1 + u3;
Modified: sandbox/endian/libs/endian/test/endian_test.cpp
==============================================================================
--- sandbox/endian/libs/endian/test/endian_test.cpp (original)
+++ sandbox/endian/libs/endian/test/endian_test.cpp 2011-05-22 16:33:28 EDT (Sun, 22 May 2011)
@@ -16,9 +16,10 @@
//----------------------------------------------------------------------------//
-#include <boost/integer/endian.hpp>
+#include <boost/endian/integers.hpp>
#include <boost/cstdint.hpp>
#include <boost/progress.hpp>
+#include <boost/detail/lightweight_main.hpp>
#include <iostream>
#include <limits>
@@ -28,7 +29,7 @@
using namespace std; // Not the best programming practice, but I
using namespace boost; // want to verify this combination of using
-using namespace boost::integer; // namespaces works. See endian_operations_test
+using namespace boost::endian; // namespaces works. See endian_operations_test
// // for tests that don't do "using namespace".
#define VERIFY(predicate) verify( predicate, __LINE__ )
@@ -720,7 +721,7 @@
// main ------------------------------------------------------------------------------//
-int main( int argc, char * argv[] )
+int cpp_main( int argc, char * argv[] )
{
cout << "Usage: "
<< argv[0] << " [#],\n where # specifies iteration count\n"
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