stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elemi...@apache.org
Subject svn commit: r677465 - /stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp
Date Wed, 16 Jul 2008 23:21:01 GMT
Author: elemings
Date: Wed Jul 16 16:21:00 2008
New Revision: 677465

URL: http://svn.apache.org/viewvc?rev=677465&view=rev
Log:
2008-07-16  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-958
	* tests/utilities/20.tuple.cnstr.cpp: Simplify random character
	generation.


Modified:
    stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp

Modified: stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp?rev=677465&r1=677464&r2=677465&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp (original)
+++ stdcxx/branches/4.3.x/tests/utilities/20.tuple.cnstr.cpp Wed Jul 16 16:21:00 2008
@@ -466,9 +466,7 @@
     rw_info (0, __FILE__, __LINE__,
              "copy constructor (heterogenous tuples)");
 
-    int i = 0;
-    do i = std::rand ();
-    while (i > CHAR_MAX);
+    int i = std::rand () % CHAR_MAX;
 
     const CompatIntTuple cit (static_cast<char> (i));
     IntTuple it (cit);
@@ -494,9 +492,7 @@
     rw_info (0, __FILE__, __LINE__,
              "move constructor (heterogenous tuples)");
 
-    int i = 0;
-    do i = std::rand ();
-    while (i > CHAR_MAX);
+    int i = std::rand () % CHAR_MAX;
 
     CompatIntTuple cit (static_cast<char> (i));
     IntTuple it (std::move (cit));
@@ -522,9 +518,7 @@
     rw_info (0, __FILE__, __LINE__,
              "copy assignment operator (heterogenous tuples)");
 
-    int i = 0;
-    do i = std::rand ();
-    while (i > CHAR_MAX);
+    int i = std::rand () % CHAR_MAX;
 
     CompatIntTuple cit (static_cast<char> (i));
     IntTuple it;
@@ -553,9 +547,7 @@
     rw_info (0, __FILE__, __LINE__,
              "move assignment operator (heterogenous tuples)");
 
-    int i = 0;
-    do i = std::rand ();
-    while (i > CHAR_MAX);
+    int i = std::rand () % CHAR_MAX;
 
     CompatIntTuple cit (i);
     IntTuple it;



Mime
View raw message