stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elemi...@apache.org
Subject svn commit: r661898 - /stdcxx/branches/4.2.x/tests/containers/23.deque.modifiers.cpp
Date Fri, 30 May 2008 22:16:48 GMT
Author: elemings
Date: Fri May 30 15:16:47 2008
New Revision: 661898

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

	STDCXX-550
	* tests/containers/23.deque.modifiers.cpp: Use same `size_t'
	type of data sources rather than `int' type and resulting type
	casts for `n_copy' and `n_asgn' parameters and variables.


Modified:
    stdcxx/branches/4.2.x/tests/containers/23.deque.modifiers.cpp

Modified: stdcxx/branches/4.2.x/tests/containers/23.deque.modifiers.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/containers/23.deque.modifiers.cpp?rev=661898&r1=661897&r2=661898&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/containers/23.deque.modifiers.cpp (original)
+++ stdcxx/branches/4.2.x/tests/containers/23.deque.modifiers.cpp Fri May 30 15:16:47 2008
@@ -131,8 +131,8 @@
                      const UserClass *x /* pointer to an element or 0 */,
                      const Iterator  &first /* beginning of range */,
                      const Iterator  &last /* end of range to insert */,
-                     int             *n_copy /* number of copy ctors */,
-                     int             *n_asgn /* number of assignments */)
+                     std::size_t     *n_copy /* number of copy ctors */,
+                     std::size_t     *n_asgn /* number of assignments */)
 {
     std::size_t throw_after = 0;
 
@@ -159,8 +159,8 @@
         _RWSTD_ASSERT (n_copy);
         _RWSTD_ASSERT (n_asgn);
 
-        *n_copy = int (UserClass::n_total_copy_ctor_);
-        *n_asgn = int (UserClass::n_total_op_assign_);
+        *n_copy = UserClass::n_total_copy_ctor_;
+        *n_asgn = UserClass::n_total_op_assign_;
 
 #ifndef _RWSTD_NO_EXCEPTIONS
 
@@ -282,8 +282,8 @@
 
     // compute the number of calls to UserClass copy ctor and assignment
     // operator and set `n_copy' and `n_assgn' to the value of the result
-    *n_copy = int (UserClass::n_total_copy_ctor_ - *n_copy);
-    *n_asgn = int (UserClass::n_total_op_assign_ - *n_asgn);
+    *n_copy = UserClass::n_total_copy_ctor_ - *n_copy;
+    *n_asgn = UserClass::n_total_op_assign_ - *n_asgn;
 }
 
 
@@ -359,8 +359,8 @@
                   nelems == -2, *ins, nelems == -1, 
                   int (inslen), -1, xins, nelems, *ins);
 
-    int n_copy = int (UserClass::n_total_copy_ctor_);
-    int n_asgn = int (UserClass::n_total_op_assign_);
+    std::size_t n_copy = UserClass::n_total_copy_ctor_;
+    std::size_t n_asgn = UserClass::n_total_op_assign_;
 
     if (-2 == nelems) {   // insert(iterator, const_reference)
 
@@ -429,8 +429,7 @@
     // of calls to the copy ctor and assignment operator on value_type
     const std::size_t expect_copy = nelems < 0 ? inslen : nelems;
 
-    rw_assert (n_copy == int (expect_copy),
-               __FILE__, line,
+    rw_assert (n_copy == expect_copy, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::UserClass(const UserClass&), got %d\n",
                __LINE__, funcall, expect_copy, n_copy);
@@ -439,8 +438,7 @@
     const std::size_t expect_asgn =
         insert_assignments (dummy, nelems, off, seqlen, inslen);
 
-    rw_assert (n_asgn == int (expect_asgn), 
-               __FILE__, line,
+    rw_assert (n_asgn == expect_asgn, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::operator=(const UserClass&), got %d\n",
                __LINE__, funcall, expect_asgn, n_asgn);
@@ -872,8 +870,8 @@
                   asnlen, -1, xasn, 
                   nelems, *asn);
 
-    int n_copy = int (UserClass::n_total_copy_ctor_);
-    int n_asgn = int (UserClass::n_total_op_assign_);
+    std::size_t n_copy = UserClass::n_total_copy_ctor_;
+    std::size_t n_asgn = UserClass::n_total_op_assign_;
 
     // create a dummy deque iterator to pass to exception_loop
     // (the object will not be used by the functiuon)
@@ -963,12 +961,12 @@
     const std::size_t expect_asgn = 0;
 #endif   // _RWSTD_NO_EXT_DEQUE_ASSIGN_IN_PLACE
 
-    rw_assert (n_copy == int (expect_copy), 0, line,
+    rw_assert (n_copy == expect_copy, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::UserClass(const UserClass&), got %d\n",
                __LINE__, funcall, expect_copy, n_copy);
 
-    rw_assert (n_asgn == int (expect_asgn), 0, line,
+    rw_assert (n_asgn == expect_asgn, __FILE__, line,
                "line %d: %s: expected %zu invocations "
                "of UserClass::operator=(const UserClass&), got %d\n",
                __LINE__, funcall, expect_asgn, n_asgn);
@@ -1074,8 +1072,8 @@
     Deque deq = seqlen ? Deque (xseq, xseq + seqlen) : Deque ();
     const Deque::iterator start = deq.begin () + begoff;
  
-    int n_copy = int (UserClass::n_total_copy_ctor_);
-    int n_asgn = int (UserClass::n_total_op_assign_);
+    std::size_t n_copy = UserClass::n_total_copy_ctor_;
+    std::size_t n_asgn = UserClass::n_total_op_assign_;
 
     char* funcall = 0;
     std::size_t buflen = 0;



Mime
View raw message