<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems (2011-07-29)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
<font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-07-29 Pawel Zagorski <pzagor@agh.edu.pl>
PR 1865/tests
* stringto01/Makefile.am, stringto01/init.c, stringto01/stringto01.doc,
stringto01/stringto01.scn, stringto01/stringto_test_template.h:
Improve coverage of string conversion routines.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/ChangeLog.diff?r1=text&tr1=1.273&r2=text&tr2=1.274&diff_format=h">M</a></td><td width='1%'>1.274</td><td width='100%'>testsuites/libtests/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/Makefile.am.diff?r1=text&tr1=1.4&r2=text&tr2=1.5&diff_format=h">M</a></td><td width='1%'>1.5</td><td width='100%'>testsuites/libtests/stringto01/Makefile.am</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/init.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.6&diff_format=h">M</a></td><td width='1%'>1.6</td><td width='100%'>testsuites/libtests/stringto01/init.c</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/stringto01.doc.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>testsuites/libtests/stringto01/stringto01.doc</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/stringto01.scn.diff?r1=text&tr1=1.2&r2=text&tr2=1.3&diff_format=h">M</a></td><td width='1%'>1.3</td><td width='100%'>testsuites/libtests/stringto01/stringto01.scn</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems/testsuites/libtests/stringto01/stringto_test_template.h.diff?r1=text&tr1=1.3&r2=text&tr2=1.4&diff_format=h">M</a></td><td width='1%'>1.4</td><td width='100%'>testsuites/libtests/stringto01/stringto_test_template.h</td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems/testsuites/libtests/ChangeLog:1.273 rtems/testsuites/libtests/ChangeLog:1.274
--- rtems/testsuites/libtests/ChangeLog:1.273 Fri Jul 29 08:59:42 2011
+++ rtems/testsuites/libtests/ChangeLog Fri Jul 29 15:29:13 2011
</font><font color='#997700'>@@ -1,3 +1,10 @@
</font><font color='#000088'>+2011-07-29 Pawel Zagorski <pzagor@agh.edu.pl>
+
+ PR 1865/tests
+ * stringto01/Makefile.am, stringto01/init.c, stringto01/stringto01.doc,
+ stringto01/stringto01.scn, stringto01/stringto_test_template.h:
+ Improve coverage of string conversion routines.
+
</font> 2011-07-29 Ralf Corsépius <ralf.corsepius@rtems.org>
* POSIX/iconv.c, POSIX/iconv_open.c, POSIX/iconv_close.c: New.
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/Makefile.am:1.4 rtems/testsuites/libtests/stringto01/Makefile.am:1.5
--- rtems/testsuites/libtests/stringto01/Makefile.am:1.4 Mon Jun 20 03:53:02 2011
+++ rtems/testsuites/libtests/stringto01/Makefile.am Fri Jul 29 15:29:13 2011
</font><font color='#997700'>@@ -14,7 +14,6 @@
</font> include $(top_srcdir)/../automake/compile.am
include $(top_srcdir)/../automake/leaf.am
<font color='#880000'>-stringto01_LDADD = $(MANAGERS_NOT_WANTED:%=$(PROJECT_LIB)/no-%.rel)
</font>
AM_CPPFLAGS += -I$(top_srcdir)/../support/include
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/init.c:1.5 rtems/testsuites/libtests/stringto01/init.c:1.6
--- rtems/testsuites/libtests/stringto01/init.c:1.5 Tue Feb 22 01:34:08 2011
+++ rtems/testsuites/libtests/stringto01/init.c Fri Jul 29 15:29:13 2011
</font><font color='#997700'>@@ -45,7 +45,8 @@
</font> #define TEST_STRING_TO_NAME test_rtems_string_to_unsigned_char
#define STRING_TO_NAME_METHOD rtems_string_to_unsigned_char
#define STRING_TO_NAME_METHOD_STRING "rtems_string_to_unsigned_char"
<font color='#880000'>-/* #define TEST_TOO_LARGE_STRING "987654321123456789123456789" */
</font><font color='#000088'>+#define TEST_TOO_LARGE_STRING "987654321123456789123456789"
+#define TEST_TOO_LARGE_FOR_UCHAR "256"<span style="background-color: #FF0000"> </span>
</font> #define STRING_TO_INTEGER
#include "stringto_test_template.h"
<font color='#997700'>@@ -57,6 +58,7 @@
</font> #define STRING_TO_NAME_METHOD rtems_string_to_int
#define STRING_TO_NAME_METHOD_STRING "rtems_string_to_int"
#define TEST_TOO_LARGE_STRING "987654321123456789123456789"
<font color='#000088'>+#define TEST_TOO_SMALL_STRING "-98765432198765432123456789"
</font> #define STRING_TO_INTEGER
#include "stringto_test_template.h"
<font color='#997700'>@@ -117,6 +119,7 @@
</font> #define STRING_TO_NAME_METHOD rtems_string_to_float
#define STRING_TO_NAME_METHOD_STRING "rtems_string_to_float"
#define TEST_TOO_LARGE_STRING "9.87654321123456789123456789E10240"
<font color='#000088'>+#define TEST_TOO_SMALL_STRING "-9.87654321123456789123456789E10240"
</font> #define STRING_TO_FLOAT
#include "stringto_test_template.h"
<font color='#997700'>@@ -126,6 +129,7 @@
</font> #define STRING_TO_NAME_METHOD rtems_string_to_double
#define STRING_TO_NAME_METHOD_STRING "rtems_string_to_double"
#define TEST_TOO_LARGE_STRING "9.87654321123456789123456789E10240"
<font color='#000088'>+#define TEST_TOO_SMALL_STRING "-9.87654321123456789123456789E10240"
</font> #define STRING_TO_FLOAT
#include "stringto_test_template.h"
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/stringto01.doc:1.1 rtems/testsuites/libtests/stringto01/stringto01.doc:1.2
--- rtems/testsuites/libtests/stringto01/stringto01.doc:1.1 Tue Dec 1 16:10:33 2009
+++ rtems/testsuites/libtests/stringto01/stringto01.doc Fri Jul 29 15:29:13 2011
</font><font color='#997700'>@@ -28,4 +28,4 @@
</font>
Concepts:
<font color='#880000'>-+ Exhaustively test strong to number conversion helpers.
</font><font color='#000088'>++ Exhaustively test string to number conversion helpers.
</font>
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/stringto01.scn:1.2 rtems/testsuites/libtests/stringto01/stringto01.scn:1.3
--- rtems/testsuites/libtests/stringto01/stringto01.scn:1.2 Mon Jul 19 08:10:48 2010
+++ rtems/testsuites/libtests/stringto01/stringto01.scn Fri Jul 29 15:29:13 2011
</font><font color='#997700'>@@ -1,3 +1,5 @@
</font><font color='#000088'>+
+
</font> *** STRING TO CONVERSION TEST ***
Testing rtems_string_to_pointer
<font color='#997700'>@@ -13,6 +15,8 @@
</font> rtems_string_to_unsigned_char - 123 w/endptr return value - RTEMS_SUCCESSFUL
rtems_string_to_unsigned_char - YYY w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_unsigned_char - empty string - w/endptr return value - RTEMS_NOT_DEFINED
<font color='#000088'>+rtems_string_to_unsigned_char - overflow - RTEMS_INVALID_NUMBER
+rtems_string_to_unsigned_char - overflow - RTEMS_INVALID_NUMBER
</font>
Testing rtems_string_to_int
rtems_string_to_int - NULL return value - RTEMS_INVALID_ADDRESS
<font color='#997700'>@@ -22,6 +26,7 @@
</font> rtems_string_to_int - YYY w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_int - empty string - w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_int - overflow - RTEMS_INVALID_NUMBER
<font color='#000088'>+rtems_string_to_int- RTEMS_INVALID_NUMBER
</font>
Testing rtems_string_to_unsigned_int
rtems_string_to_unsigned_int - NULL return value - RTEMS_INVALID_ADDRESS
<font color='#997700'>@@ -74,6 +79,7 @@
</font> rtems_string_to_float - zzz w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_float - empty string - w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_float - overflow - RTEMS_INVALID_NUMBER
<font color='#000088'>+rtems_string_to_float- RTEMS_INVALID_NUMBER
</font>
Testing rtems_string_to_double
rtems_string_to_double - NULL return value - RTEMS_INVALID_ADDRESS
<font color='#997700'>@@ -82,4 +88,5 @@
</font> rtems_string_to_double - zzz w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_double - empty string - w/endptr return value - RTEMS_NOT_DEFINED
rtems_string_to_double - overflow - RTEMS_INVALID_NUMBER
<font color='#000088'>+rtems_string_to_double- RTEMS_INVALID_NUMBER
</font> *** END OF STRING TO CONVERSION TEST ***
<font color='#006600'>diff -u rtems/testsuites/libtests/stringto01/stringto_test_template.h:1.3 rtems/testsuites/libtests/stringto01/stringto_test_template.h:1.4
--- rtems/testsuites/libtests/stringto01/stringto_test_template.h:1.3 Mon Jul 19 08:10:48 2010
+++ rtems/testsuites/libtests/stringto01/stringto_test_template.h Fri Jul 29 15:29:13 2011
</font><font color='#997700'>@@ -139,6 +139,23 @@
</font> rtems_test_assert( endptr );
#endif
<font color='#000088'>+
+ /* Conversion of number that is too large for unsigned char */
+ #if defined(TEST_TOO_LARGE_FOR_UCHAR)
+ endptr = NULL;
+ value = 0;
+ puts(
+ STRING_TO_NAME_METHOD_STRING " - overflow - RTEMS_INVALID_NUMBER" );
+ #if defined(STRING_TO_INTEGER)
+ status = STRING_TO_NAME_METHOD(
+ TEST_TOO_LARGE_FOR_UCHAR, &value, &endptr, 10 );
+ #endif
+ if ( status != RTEMS_INVALID_NUMBER )
+ printf( "ERROR = %s\n", rtems_status_text(status) );
+ rtems_test_assert( status == RTEMS_INVALID_NUMBER );
+ rtems_test_assert( endptr );
+ #endif
+
</font> /* Conversion of number that is too small */
#if defined(TEST_TOO_SMALL_STRING)
endptr = NULL;
<font color='#997700'>@@ -170,3 +187,4 @@
</font> #undef BAD_VALUE_STRING
#undef TEST_TOO_LARGE_STRING
#undef TEST_TOO_SMALL_STRING
<font color='#000088'>+#undef TEST_TOO_LARGE_FOR_UCHAR
</font></pre>
<p> </p>
<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>