Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51856 - in sandbox/endian/libs/integer: . doc test
From: bdawes_at_[hidden]
Date: 2009-03-19 11:38:48


Author: bemandawes
Date: 2009-03-19 11:38:46 EDT (Thu, 19 Mar 2009)
New Revision: 51856
URL: http://svn.boost.org/trac/boost/changeset/51856

Log:
Endian: get ready to test on more compilers
Text files modified:
   sandbox/endian/libs/integer/doc/endian.html | 26 +++++++++++++-------------
   sandbox/endian/libs/integer/test/Jamfile.v2 | 18 +++++++++++-------
   sandbox/endian/libs/integer/test/test.bat | 4 ++--
   sandbox/endian/libs/integer/zip-endian.bat | 33 ++++++++++++++++++++++-----------
   4 files changed, 48 insertions(+), 33 deletions(-)

Modified: sandbox/endian/libs/integer/doc/endian.html
==============================================================================
--- sandbox/endian/libs/integer/doc/endian.html (original)
+++ sandbox/endian/libs/integer/doc/endian.html 2009-03-19 11:38:46 EDT (Thu, 19 Mar 2009)
@@ -281,19 +281,19 @@
   namespace integer
   {
      
- namespace <a name="endianness">endianness</a> { enum enum_t { big, little, native }; } // simulate C++0x scoped enum
- namespace <a name="alignment">alignment</a> { enum enum_t { unaligned, aligned }; } // simulate C++0x scoped enum
+ enum class <a name="endianness">endianness</a> { big, little, native }; // scoped enum emulated on C++03
+ enum class <a name="alignment">alignment</a> { unaligned, aligned }; // scoped enum emulated on C++03
 
- template &lt;endianness::enum_t E, typename T, std::size_t n_bits,
- alignment::enum_t A = alignment::unaligned&gt;
+ template &lt;endianness E, typename T, std::size_t n_bits,
+ alignment A = alignment::unaligned&gt;
     class endian : integer_cover_operators&lt; endian&lt;E, T, n_bits, A&gt;, T &gt;
     {
     public:
       typedef T value_type;
- endian(){}
- explicit endian(T v);
- endian &amp; operator=(T v);
- operator T() const;
+ endian() = default; // = default replaced by {} on C++03
+ explicit endian(T v);
+ endian &amp; operator=(T v);
+ operator T() const;
     };
 
     // unaligned big endian signed integer types
@@ -385,29 +385,29 @@
   } // namespace integer
 } // namespace boost</pre>
 <h3><a name="Members">Members</a></h3>
-<p><code>endian(){}</code></p>
+<p><code><a name="endian">endian</a>() = default;&nbsp; // C++03: endian(){}</code></p>
 <blockquote>
 <p><i>Effects:</i> Constructs an object of type <code>endian&lt;E, T, n_bits, A&gt;</code>.</p>
 </blockquote>
-<p><code>explicit endian(T v);</code></p>
+<p><code><a name="explicit-endian">explicit endian</a>(T v);</code></p>
 <blockquote>
 <p><i>Effects:</i> Constructs an object of type <code>endian&lt;E, T, n_bits, A&gt;</code>.</p>
 <p><i>Postcondition:</i> <code>x == v,</code> where <code>x</code> is the
 constructed object.</p>
 </blockquote>
-<p><code>endian &amp; operator=(T v);</code></p>
+<p><code>endian &amp; <a name="operator-eq">operator=</a>(T v);</code></p>
 <blockquote>
   <p><i>Postcondition:</i> <code>x == v,</code> where <code>x</code> is the
   constructed object.</p>
   <p><i>Returns:</i> <code>*this</code>.</p>
 </blockquote>
-<p><code>operator T() const;</code></p>
+<p><code><a name="operator-T">operator T</a>() const;</code></p>
 <blockquote>
 <p><i>Returns:</i> The current value stored in <code>*this</code>, converted to
 <code>value_type</code>.</p>
 </blockquote>
 <h3>Other operators</h3>
-<p>All other operators on endian objects are forwarded to the equivalent
+<p>Other operators on endian objects are forwarded to the equivalent
 operator on <code>value_type</code>.</p>
 <h2><a name="FAQ">FAQ</a></h2>
 <p><b>Why bother with endian types?</b> External data portability and both speed

Modified: sandbox/endian/libs/integer/test/Jamfile.v2
==============================================================================
--- sandbox/endian/libs/integer/test/Jamfile.v2 (original)
+++ sandbox/endian/libs/integer/test/Jamfile.v2 2009-03-19 11:38:46 EDT (Thu, 19 Mar 2009)
@@ -2,15 +2,19 @@
 
 # Copyright Beman Dawes 2006
 
-# 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)
+# Distributed under the Boost Software License, Version 1.0.
+# See http://www.boost.org/LICENSE_1_0.txt
 
-# See library home page at http://www.boost.org/libs/endian
+# See library home page at http://www.boost.org/libs/integer/doc/endian.html
 
    import testing ;
    
    test-suite "endian"
- : [ run endian_test.cpp ]
-# [ run endian_operations_test.cpp ]
-# [ run endian_in_union_test.cpp ]
- ;
+ :
+ [ run binary_stream_test.cpp ]
+ [ run endian_binary_stream_test.cpp ]
+ [ run endian_test.cpp ]
+ [ run endian_operations_test.cpp ]
+ [ run endian_in_union_test.cpp ]
+ [ run scoped_enum_emulation_test.cpp ]
+ ;

Modified: sandbox/endian/libs/integer/test/test.bat
==============================================================================
--- sandbox/endian/libs/integer/test/test.bat (original)
+++ sandbox/endian/libs/integer/test/test.bat 2009-03-19 11:38:46 EDT (Thu, 19 Mar 2009)
@@ -1,8 +1,8 @@
-set ENDIAN_LOCATE_ROOT=%temp%\endian-regr
+set ENDIAN_LOCATE_ROOT=%TEMP%\endian-regr
 md %ENDIAN_LOCATE_ROOT% 2>nul
 
 echo Begin test processing...
-bjam --dump-tests "-sALL_LOCATE_TARGET=%ENDIAN_LOCATE_ROOT%" %* >bjam.log 2>&1
+bjam --dump-tests includes=/boost/trunk "-sALL_LOCATE_TARGET=%ENDIAN_LOCATE_ROOT%" %* >bjam.log 2>&1
 echo Begin log processing...
 process_jam_log %ENDIAN_LOCATE_ROOT% <bjam.log
 start bjam.log

Modified: sandbox/endian/libs/integer/zip-endian.bat
==============================================================================
--- sandbox/endian/libs/integer/zip-endian.bat (original)
+++ sandbox/endian/libs/integer/zip-endian.bat 2009-03-19 11:38:46 EDT (Thu, 19 Mar 2009)
@@ -2,26 +2,37 @@
 
 if $%1 == $ goto error
 
-rmdir /s \tmp\%1 2>nul
+rmdir /s \temp\%1 2>nul
 pushd .
-mkdir \tmp\%1
-cd \tmp\%1
+mkdir \temp\%1
+cd \temp\%1
+md doc\html
 md boost\integer
 md libs\integer\doc
 md libs\integer\example
 md libs\integer\test
 popd
-copy ..\..\boost\integer\endian.hpp \tmp\%1\boost\integer
-copy ..\..\boost\integer\cover_operators.hpp \tmp\%1\boost\integer
-copy ..\..\libs\integer\doc\endian.html \tmp\%1\libs\integer\doc
-copy ..\..\libs\integer\example\endian_example.cpp \tmp\%1\libs\integer\example
-copy ..\..\libs\integer\test\endian_test.cpp \tmp\%1\libs\integer\test
-copy ..\..\libs\integer\test\Jamfile.* \tmp\%1\libs\integer\test
+copy ..\..\boost.png \temp\%1
+copy ..\..\boost\doc\html\minimal.css \temp\%1\doc\html
+copy ..\..\boost\binary_stream.hpp \temp\%1\boost
+copy ..\..\boost\integer\endian.hpp \temp\%1\boost\integer
+copy ..\..\boost\integer\endian_binary_stream.hpp \temp\%1\boost\integer
+copy ..\..\boost\integer\cover_operators.hpp \temp\%1\boost\integer
+copy ..\..\libs\integer\doc\endian.html \temp\%1\libs\integer\doc
+copy ..\..\libs\integer\example\endian_example.cpp \temp\%1\libs\integer\example
+copy ..\..\libs\integer\example\endian_hello_world.cpp \temp\%1\libs\integer\example
+copy ..\..\libs\integer\test\endian_test.cpp \temp\%1\libs\integer\test
+copy ..\..\libs\integer\test\binary_stream_test.cpp \temp\%1\libs\integer\test
+copy ..\..\libs\integer\test\endian_binary_stream_test.cpp \temp\%1\libs\integer\test
+copy ..\..\libs\integer\test\endian_in_union_test.cpp \temp\%1\libs\integer\test
+copy ..\..\libs\integer\test\endian_operations_test.cpp \temp\%1\libs\integer\test
+copy ..\..\libs\integer\test\scoped_enum_emulation_test.cpp \temp\%1\libs\integer\test
+copy ..\..\libs\integer\test\Jamfile.* \temp\%1\libs\integer\test
 
-pushd \tmp
+pushd \temp
 zip -r %1.zip %1
 popd
-move \tmp\%1.zip .
+move \temp\%1.zip .
 
 goto done
 


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