You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Liviu Nicoara <ni...@roguewave.com> on 2006/02/06 21:53:59 UTC
error mesage from driver
The following test case:
$ cat > t.cpp << EOF
include <driver.h>
int main ()
{
rw_assert (0, 0, 0, "");
return 0;
}
EOF
yields the following error message:
$ ./t
/build/nicoara/stdcxx/tests/src/driver.cpp:1164: rw_assert(): test
driver already initialized
Aborted
The message does not seem to make much sense to me. Shouldn't it be "the
test driver has not been initialized yet"?
Liviu
Re: 23.deque.iterators.cpp
Posted by Martin Sebor <se...@roguewave.com>.
Liviu Nicoara wrote:
> I have attached the converted test in subject line.
Great, thanks! I made a few changes and committed it here:
http://svn.apache.org/viewcvs.cgi?rev=375703&view=rev
>
> The explanatory pieces of text accompanying the assertions are in
> certain [few] cases kind of silly.
You mean the "Expected value..." stuff? Well, yes. That's probably
one of the reasons why the original test used plain assert() rather
than something more sophisticated. All that matters here is that
the test pass. A single failure is just as bad and the whole test
failing since it indicates an inconsistency in the container, and
in that case the actual values the iterator returns probably won't
make any sense anyway. I didn't see the test yesterday when you
asked what to do with the assertions otherwise I could have saved
you the time adding all this stuff. Sorry about that.
One more comment below:
[...]
> #ifndef _RWSTD_NO_REPLACEABLE_NEW_DELETE
> // disabled for compilers that can't reliably replace the operators
>
> // replace operators new and delete with versions that invalidate
> // storage to detect problems due to deque iterators accessing
> // uninitialized pointers
> # define DEFINE_REPLACEMENT_NEW_AND_DELETE
This doesn't do anything. We need to #include <rw_new.h> to get the
replacement operators.
> #endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE
Martin
23.deque.iterators.cpp
Posted by Liviu Nicoara <ni...@roguewave.com>.
I have attached the converted test in subject line.
The explanatory pieces of text accompanying the assertions are in
certain [few] cases kind of silly.
Liviu
Re: error mesage from driver
Posted by Martin Sebor <se...@roguewave.com>.
Liviu Nicoara wrote:
> The following test case:
>
> $ cat > t.cpp << EOF
>
> include <driver.h>
>
> int main ()
> {
> rw_assert (0, 0, 0, "");
> return 0;
> }
>
> EOF
>
> yields the following error message:
>
> $ ./t
> /build/nicoara/stdcxx/tests/src/driver.cpp:1164: rw_assert(): test
> driver already initialized
> Aborted
>
>
> The message does not seem to make much sense to me. Shouldn't it be "the
> test driver has not been initialized yet"?
Yes, it should. I get the right error when using the Rogue Wave
branch so it must be somewhere in the brittle compatibility layer
between the two. Again, filing an issue in Jira would help us
remember to fix it sooner rather than later.
Thanks!
Martin
Re: formatting error
Posted by Martin Sebor <se...@roguewave.com>.
Liviu Nicoara wrote:
> The following test case:
>
> $ cat > t.cpp << EOF
>
> #include <driver.h>
>
> int run_test (int, char**)
> {
> rw_assert (0, 0, 0, "");
> return 0;
> }
>
> int main ()
> {
> return rw_test (0, 0, __FILE__, "", 0, run_test, 0);
> }
>
> EOF
>
> yields:
>
> $ ./t
> # INFO (S1) (8 lines):
> # TEXT:
> # COMPILER: gcc 3.3.4, __VERSION__ = "3.3.4"
> # ENVIRONMENT: i386 running linux-elf 2.4.29 with glibc 2.3
> # FILE: t.cpp
> # COMPILED: Feb 6 2006, 13:45:04
> # COMMENT:
> ######################################################
>
> # ASSERTION (S7) (2 lines):
> # TEXT: *** formatting error ***
>
> # +-----------------------+--------+--------+--------+
> # | DIAGNOSTIC | ACTIVE | TOTAL |INACTIVE|
> # +-----------------------+--------+--------+--------+
> # | (S1) INFO | 1 | 1 | 0% |
> # | (S7) ASSERTION | 1 | 1 | 0% |
> # +-----------------------+--------+--------+--------+
>
>
> Is the "formatting error" message correct and/or intended? I would
> expect the empty formatting string to be accepted.
It's a bug that I've known about but haven't yet found the time
to fix. Unless you're itching to do it yourself it would be good
to have an issue for it as a reminder. If you could open one it'd
be great! :)
Martin
formatting error
Posted by Liviu Nicoara <ni...@roguewave.com>.
The following test case:
$ cat > t.cpp << EOF
#include <driver.h>
int run_test (int, char**)
{
rw_assert (0, 0, 0, "");
return 0;
}
int main ()
{
return rw_test (0, 0, __FILE__, "", 0, run_test, 0);
}
EOF
yields:
$ ./t
# INFO (S1) (8 lines):
# TEXT:
# COMPILER: gcc 3.3.4, __VERSION__ = "3.3.4"
# ENVIRONMENT: i386 running linux-elf 2.4.29 with glibc 2.3
# FILE: t.cpp
# COMPILED: Feb 6 2006, 13:45:04
# COMMENT:
######################################################
# ASSERTION (S7) (2 lines):
# TEXT: *** formatting error ***
# +-----------------------+--------+--------+--------+
# | DIAGNOSTIC | ACTIVE | TOTAL |INACTIVE|
# +-----------------------+--------+--------+--------+
# | (S1) INFO | 1 | 1 | 0% |
# | (S7) ASSERTION | 1 | 1 | 0% |
# +-----------------------+--------+--------+--------+
Is the "formatting error" message correct and/or intended? I would
expect the empty formatting string to be accepted.
Liviu