Author: faridz
Date: Tue Sep 18 10:57:11 2007
New Revision: 577001
URL: http://svn.apache.org/viewvc?rev=577001&view=rev
Log:
2007-09-18 Farid Zaripov <[EMAIL PROTECTED]>
* 22.locale.stdcxx-554.cpp: Removed dependency on rwtest library.
Modified:
incubator/stdcxx/trunk/tests/regress/22.locale.stdcxx-554.cpp
Modified: incubator/stdcxx/trunk/tests/regress/22.locale.stdcxx-554.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/22.locale.stdcxx-554.cpp?rev=577001&r1=577000&r2=577001&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/regress/22.locale.stdcxx-554.cpp (original)
+++ incubator/stdcxx/trunk/tests/regress/22.locale.stdcxx-554.cpp Tue Sep 18
10:57:11 2007
@@ -25,13 +25,12 @@
**************************************************************************/
#include <cstring> // for memset()
+#include <cassert> // for assert()
#include <locale> // for std::moneypunct, std::messages
-#include <driver.h> // for rw_test()
-
template <class charT>
-void test_moneypunct (charT, const char* name)
+void test_moneypunct (charT)
{
typedef std::moneypunct <charT> PunctT;
@@ -42,15 +41,13 @@
PunctT* p = new (buf) PunctT ();
- rw_assert (fill == buf [sizeof (PunctT)], __FILE__, __LINE__,
- "buf [sizeof (std::moneypunct <%s>)] expected %d, got %d\n",
- name, int (fill), int (buf [sizeof (PunctT)]));
+ assert (fill == buf [sizeof (PunctT)]);
p->~PunctT ();
}
template <class charT>
-void test_messages (charT, const char* name)
+void test_messages (charT)
{
typedef std::messages <charT> MessagesT;
@@ -61,32 +58,20 @@
MessagesT* p = new (buf) MessagesT ();
- rw_assert (fill == buf [sizeof (MessagesT)], __FILE__, __LINE__,
- "buf [sizeof (std::messages <%s>)] expected %d, got %d\n",
- name, int (fill), int (buf [sizeof (MessagesT)]));
+ assert (fill == buf [sizeof (MessagesT)]);
p->~MessagesT ();
}
-static int run_test (int, char**)
+int main (int, char* [])
{
- test_moneypunct (char (), "char");
- test_messages (char (), "char");
+ test_moneypunct (char ());
+ test_messages (char ());
#ifndef _RWSTD_NO_WCHAR_T
- test_moneypunct (wchar_t (), "wchar_t");
- test_messages (wchar_t (), "wchar_t");
+ test_moneypunct (wchar_t ());
+ test_messages (wchar_t ());
#endif
return 0;
-}
-
-int main (int argc, char* argv[])
-{
- return rw_test (argc, argv, __FILE__,
- "lib.locale",
- "STDCXX-544",
- run_test,
- "",
- (void*)0);
}