You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by el...@apache.org on 2008/04/01 18:40:55 UTC

svn commit: r643473 - /stdcxx/trunk/tests/support/18.numeric.special.float.cpp

Author: elemings
Date: Tue Apr  1 09:40:44 2008
New Revision: 643473

URL: http://svn.apache.org/viewvc?rev=643473&view=rev
Log:
Tue Apr  1 16:28:22 UTC 2008    Eric Lemings <er...@roguewave.com>

STDCXX-708 <https://issues.apache.org/jira/browse/STDCXX-708>
* tests/support/18.numeric.special.float.cpp: Change expected values for
std::numeric_limits<FloatT>::has_denorm() to std::denorm_present on all
HP-UX platforms (inc. PA-RISC and IPF) per comments recorded in the issue.


Modified:
    stdcxx/trunk/tests/support/18.numeric.special.float.cpp

Modified: stdcxx/trunk/tests/support/18.numeric.special.float.cpp
URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/support/18.numeric.special.float.cpp?rev=643473&r1=643472&r2=643473&view=diff
==============================================================================
--- stdcxx/trunk/tests/support/18.numeric.special.float.cpp (original)
+++ stdcxx/trunk/tests/support/18.numeric.special.float.cpp Tue Apr  1 09:40:44 2008
@@ -451,11 +451,9 @@
 
     static std::float_denorm_style has_denorm () {
 
-#if defined (_AIX)
-        return std::denorm_present;
-#elif defined (__hpux)
-        return std::denorm_indeterminate;
-#elif defined (__osf__)
+#if defined (_AIX) \
+    || defined (__hpux) \
+    || defined (__osf__)
         return std::denorm_present;
 #else
         return std::denorm_indeterminate;
@@ -720,11 +718,9 @@
 
 
     static std::float_denorm_style has_denorm () {
-#if defined (_AIX)
-        return std::denorm_present;
-#elif defined (__hpux)
-        return std::denorm_indeterminate;
-#elif defined (__osf__)
+#if defined (_AIX) \
+    || defined (__hpux) \
+    || defined (__osf__)
         return std::denorm_present;
 #else
         return std::denorm_indeterminate;
@@ -982,11 +978,9 @@
 
 
     static std::float_denorm_style has_denorm () {
-#if defined (_AIX)
-        return std::denorm_present;
-#elif defined (__hpux)
-        return std::denorm_indeterminate;
-#elif defined (__osf__)
+#if defined (_AIX) \
+    || defined (__hpux) \
+    || defined (__osf__)
         return std::denorm_present;
 #else
         return std::denorm_indeterminate;



Re: svn commit: r643473 - /stdcxx/trunk/tests/support/18.numeric.special.float.cpp

Posted by Martin Sebor <se...@roguewave.com>.
Eric Lemings wrote:
>  
[...]
>>> STDCXX-708 <https://issues.apache.org/jira/browse/STDCXX-708>
>> Each line should be indented by a single TAB. The issue URL
>> shouldn't be here.
> 
> Why not?

Because we don't put it there. There's a documented convention
that we follow (see below). It says nothing about any link. I
don't think we need the link but if you'd like to change the
convention feel free to write up a proposal.

http://stdcxx.apache.org/bugs.html#patch_format

> 
>>> * tests/support/18.numeric.special.float.cpp:
>> The names of the function you changed should be listed in
>> parentheses, like so:
>>
>> 	* tests/support/18.numeric.special.float.cpp
>> 	(limits_values::has_denorm): ...
> 
> How do you specify partial function template specializations?

There's no such thing.

The point of the function names in the parentheses is to
help people find the changes that they might be interested
in without having to scan the whole diff. It's a judgment
call how accurately the name should identify the exact
specific function among a set of overloads or some such
ambiguities.

> 
> Most (probably all) of the GNU ChangeLog conventions were written for
> C and don't translate to more advanced C++ features very well.  Not
> to say that we couldn't tailor them; just need to have them in
> writing somewhere.
> 
>> If your changes are conditional (i.e., based on some preprocessor
>> macro), you should list the conditional in square brackets before
>> the list of the functions it applies to, e.g.,
>>
>> 	* tests/support/18.numeric.special.float.cpp
>> 	[_AIX || __hpux] (limits_values::has_denorm): ...
> 
> I don't recall seeing this convention in the GNU docs anywhere.

It's described in the GNU coding standars:
http://www.gnu.org/prep/standards/html_node/Conditional-Changes.html#Conditional-Changes

Martin

RE: svn commit: r643473 - /stdcxx/trunk/tests/support/18.numeric.special.float.cpp

Posted by Eric Lemings <Er...@roguewave.com>.
 

> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Tuesday, April 01, 2008 11:13 AM
> To: dev@stdcxx.apache.org
> Subject: Re: svn commit: r643473 - 
> /stdcxx/trunk/tests/support/18.numeric.special.float.cpp
> 
...
> 
> If you use Emacs, the add-change-log-entry command produces
> the correct format automatically.

I don't use Emacs.

> 
> You can see examples of correctly formatted entries in
> the ChangeLog file:
> http://svn.apache.org/repos/asf/stdcxx/trunk/ChangeLog
> for examples.
> 
> > Log:
> > Tue Apr  1 16:28:22 UTC 2008    Eric Lemings 
> <er...@roguewave.com>
> 
> The date format is YYYY-MM-DD.
> 
> > 
> > STDCXX-708 <https://issues.apache.org/jira/browse/STDCXX-708>
> 
> Each line should be indented by a single TAB. The issue URL
> shouldn't be here.

Why not?

> 
> > * tests/support/18.numeric.special.float.cpp:
> 
> The names of the function you changed should be listed in
> parentheses, like so:
> 
> 	* tests/support/18.numeric.special.float.cpp
> 	(limits_values::has_denorm): ...

How do you specify partial function template specializations?

Most (probably all) of the GNU ChangeLog conventions were written for
C and don't translate to more advanced C++ features very well.  Not
to say that we couldn't tailor them; just need to have them in
writing somewhere.

> If your changes are conditional (i.e., based on some preprocessor
> macro), you should list the conditional in square brackets before
> the list of the functions it applies to, e.g.,
> 
> 	* tests/support/18.numeric.special.float.cpp
> 	[_AIX || __hpux] (limits_values::has_denorm): ...

I don't recall seeing this convention in the GNU docs anywhere.

> 
> You can correct this Change Log entry via the svn propedit
> command, like so:
> 
> svn propedit svn:log --revprop -r643473 \
>      https://svn.apache.org/repos/asf/stdcxx

Fixed.

BTW, are these ChangeLogs parsed by any tools (other than Emacs)?

Also, I have another great idea.  Tweak the Subversion checkin command
so that it automatically provides a GNU ChangeLog template format as
the default change description.  That would save us a lot of time
putting change descriptions in the right format (and telling others to
do the same).  :)

Brad.

Re: svn commit: r643473 - /stdcxx/trunk/tests/support/18.numeric.special.float.cpp

Posted by Martin Sebor <se...@roguewave.com>.
elemings@apache.org wrote:
> Author: elemings
> Date: Tue Apr  1 09:40:44 2008
> New Revision: 643473
> 
> URL: http://svn.apache.org/viewvc?rev=643473&view=rev

Brad, a few notes on the format of your Change Log. Our
convention is to use the GNU/Emacs format for Change Logs
described in the Emacs manual:
http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log.html#Change-Log

If you use Emacs, the add-change-log-entry command produces
the correct format automatically.

You can see examples of correctly formatted entries in
the ChangeLog file:
http://svn.apache.org/repos/asf/stdcxx/trunk/ChangeLog
for examples.

> Log:
> Tue Apr  1 16:28:22 UTC 2008    Eric Lemings <er...@roguewave.com>

The date format is YYYY-MM-DD.

> 
> STDCXX-708 <https://issues.apache.org/jira/browse/STDCXX-708>

Each line should be indented by a single TAB. The issue URL
shouldn't be here.

> * tests/support/18.numeric.special.float.cpp:

The names of the function you changed should be listed in
parentheses, like so:

	* tests/support/18.numeric.special.float.cpp
	(limits_values::has_denorm): ...

If your changes are conditional (i.e., based on some preprocessor
macro), you should list the conditional in square brackets before
the list of the functions it applies to, e.g.,

	* tests/support/18.numeric.special.float.cpp
	[_AIX || __hpux] (limits_values::has_denorm): ...

You can correct this Change Log entry via the svn propedit
command, like so:

svn propedit svn:log --revprop -r643473 \
     https://svn.apache.org/repos/asf/stdcxx

Thanks
Martin

> Change expected values for
> std::numeric_limits<FloatT>::has_denorm() to std::denorm_present on all
> HP-UX platforms (inc. PA-RISC and IPF) per comments recorded in the issue.
> 
> 
> Modified:
>     stdcxx/trunk/tests/support/18.numeric.special.float.cpp
> 
> Modified: stdcxx/trunk/tests/support/18.numeric.special.float.cpp
> URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/support/18.numeric.special.float.cpp?rev=643473&r1=643472&r2=643473&view=diff
> ==============================================================================
> --- stdcxx/trunk/tests/support/18.numeric.special.float.cpp (original)
> +++ stdcxx/trunk/tests/support/18.numeric.special.float.cpp Tue Apr  1 09:40:44 2008
> @@ -451,11 +451,9 @@
>  
>      static std::float_denorm_style has_denorm () {
>  
> -#if defined (_AIX)
> -        return std::denorm_present;
> -#elif defined (__hpux)
> -        return std::denorm_indeterminate;
> -#elif defined (__osf__)
> +#if defined (_AIX) \
> +    || defined (__hpux) \
> +    || defined (__osf__)
>          return std::denorm_present;
>  #else
>          return std::denorm_indeterminate;
> @@ -720,11 +718,9 @@
>  
>  
>      static std::float_denorm_style has_denorm () {
> -#if defined (_AIX)
> -        return std::denorm_present;
> -#elif defined (__hpux)
> -        return std::denorm_indeterminate;
> -#elif defined (__osf__)
> +#if defined (_AIX) \
> +    || defined (__hpux) \
> +    || defined (__osf__)
>          return std::denorm_present;
>  #else
>          return std::denorm_indeterminate;
> @@ -982,11 +978,9 @@
>  
>  
>      static std::float_denorm_style has_denorm () {
> -#if defined (_AIX)
> -        return std::denorm_present;
> -#elif defined (__hpux)
> -        return std::denorm_indeterminate;
> -#elif defined (__osf__)
> +#if defined (_AIX) \
> +    || defined (__hpux) \
> +    || defined (__osf__)
>          return std::denorm_present;
>  #else
>          return std::denorm_indeterminate;
> 
>