[EMAIL PROTECTED] wrote:
Author: elemings
Date: Thu May 22 13:54:39 2008
New Revision: 659253
URL: http://svn.apache.org/viewvc?rev=659253&view=rev
Log:
2008-05-22 Eric Lemings <[EMAIL PROTECTED]>
STDCXX-550
[...]
* tests/containers/23.deque.modifiers.cpp: Explicitly cast
expressions involving `UserClass::n_total_copy_ctor_' and
`UserClass::n_total_op_assign_' members to `int' type of lhs of
assignment.
(test_erase): Cast `size_t' argument used as 7th parameter in
exception_loop() function to `int' type.
[...]
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=659253&r1=659252&r2=659253&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 Thu May 22
13:54:39 2008
@@ -159,8 +159,8 @@
_RWSTD_ASSERT (n_copy);
_RWSTD_ASSERT (n_asgn);
- *n_copy = UserClass::n_total_copy_ctor_;
- *n_asgn = UserClass::n_total_op_assign_;
+ *n_copy = int (UserClass::n_total_copy_ctor_);
+ *n_asgn = int (UserClass::n_total_op_assign_);
Would changing the type of n_copy and n_asgn to match the type
of the UserClass data members throughout the test be a cleaner
solution?
Martin
#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 = UserClass::n_total_copy_ctor_ - *n_copy;
- *n_asgn = UserClass::n_total_op_assign_ - *n_asgn;
+ *n_copy = int (UserClass::n_total_copy_ctor_ - *n_copy);
+ *n_asgn = int (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 = UserClass::n_total_copy_ctor_;
- int n_asgn = UserClass::n_total_op_assign_;
+ int n_copy = int (UserClass::n_total_copy_ctor_);
+ int n_asgn = int (UserClass::n_total_op_assign_);
if (-2 == nelems) { // insert(iterator, const_reference)
@@ -872,8 +872,8 @@
asnlen, -1, xasn,
nelems, *asn);
- int n_copy = UserClass::n_total_copy_ctor_;
- int n_asgn = UserClass::n_total_op_assign_;
+ int n_copy = int (UserClass::n_total_copy_ctor_);
+ int n_asgn = int (UserClass::n_total_op_assign_);
// create a dummy deque iterator to pass to exception_loop
// (the object will not be used by the functiuon)
@@ -1074,8 +1074,8 @@
Deque deq = seqlen ? Deque (xseq, xseq + seqlen) : Deque ();
const Deque::iterator start = deq.begin () + begoff;
- int n_copy = UserClass::n_total_copy_ctor_;
- int n_asgn = UserClass::n_total_op_assign_;
+ int n_copy = int (UserClass::n_total_copy_ctor_);
+ int n_asgn = int (UserClass::n_total_op_assign_);
char* funcall = 0;
std::size_t buflen = 0;
@@ -1109,7 +1109,8 @@
end - deq.begin ());
exception_loop (line, EraseRange, funcall, 0,
- deq, start, len, 0, (UserClass*)0, (UserClass*)0,
+ deq, start, int (len), 0,
+ (UserClass*)0, (UserClass*)0,
&n_copy, &n_asgn);
}