stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: New 27.basic.ios.cpp test migrated (LONG)
Date Tue, 15 Apr 2008 22:25:42 GMT
Eric Lemings wrote:
>  
> Is there any way to turn off automatic word wrapping in messges
> posted to the list?  Its supposed to make messages more readable
> but it often does just the opposite as you can see.

You can try attaching the file instead. Attachments may or may
not make it past ezmlm depending on their extension and your
mailer (Outlook is notorious for being difficult).

About the test, it looks good to me. It needs only a few minor
tweaks :)

Regarding the convention for preprocessor directives, it is
2 spaces and if there are places where it's inconsistent they
should be fixed :)

Also, most test driver headers are squeaky clean WRT namespace
pollution so they could be #included at the top of all tests,
even those that require that no unnecessary library headers
be #included first and so there's no need to be #including
them in the middle like we had to do with some of the older
tests.

Nice touch to add the command line option! WRT names of
functions and variables defined in each test, there should be
no rw_ prefix to make them easily distinguishable them names
defined by the test driver. The test driver uses the rw_
prefix for extern names and _rw_ (with a leading underscore)
for names with internal linkage (static). So the name of the
new option variable should be just opt_no_basic_ios_ctors.

One other comment about formatting: there should never be
any code after a closing curly brace. I.e., we want this

   278     if (rw_opt_no_basic_ios_ctors) {
   279         rw_note (0, 0, 0, "basic_ios<T> ctors disabled");
   280     } else {

to look like this:

   278     if (rw_opt_no_basic_ios_ctors) {
   279         rw_note (0, 0, 0, "basic_ios<T> ctors disabled");
   280     }
   281     else {

Finally, every function is extern by default. There is no need
to explicitly declare it as such (I believe there are compilers
that warn about function definitions with the extern keyword).

Martin

> 
> Brad.
> 
>> -----Original Message-----
>> From: Eric Lemings [mailto:Eric.Lemings@roguewave.com] 
>> Sent: Tuesday, April 15, 2008 3:26 PM
>> To: dev@stdcxx.apache.org
>> Subject: New 27.basic.ios.cpp test migrated (LONG)
>>
>>  
>> I've migrated an older test for integration into the test suite.  The
>> original 27_basic_ios.cpp source file is attached for comparision to
>> the new version shown below with some commentary.
>>
>> file tests/iostream/27.basic.ios.cpp:
>>
>>   1
>> /*************************************************************
>> **********
>> ****
>>   2  *
>>   3  * 27.basic.ios.cpp - test exercising the class template basic_ios
>>   4  *
>>   5  * $Id: //stdcxx/trunk/tests/iostream/27_basic_ios.cpp#1 $
>>   6  *
>>   7
>> **************************************************************
>> **********
>> ***
>>   8  *
>>   9  * Licensed to the Apache Software  Foundation (ASF) under one or
>> more
>>  10  * contributor  license agreements.  See  the NOTICE  file
>> distributed
>>  11  * with  this  work  for  additional information  regarding
>> copyright
>>  12  * ownership.   The ASF  licenses this  file to  you under  the
>> Apache
>>  13  * License, Version  2.0 (the  "License"); you may  not use  this
>> file
>>  14  * except in  compliance with the License.   You may 
>> obtain  a copy
>> of
>>  15  * the License at
>>  16  *
>>  17  * http://www.apache.org/licenses/LICENSE-2.0
>>  18  *
>>  19  * Unless required by applicable law or agreed to in writing,
>> software
>>  20  * distributed under the  License is distributed on an  "AS IS"
>> BASIS,
>>  21  * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, 
>> either  express
>> or
>>  22  * implied.   See  the License  for  the  specific language
>> governing
>>  23  * permissions and limitations under the License.
>>  24  *
>>  25  * Copyright 1994-2008 Rogue Wave Software.
>>  26  *
>>  27
>> **************************************************************
>> **********
>> **/
> ...


Mime
View raw message