You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2002/10/23 16:19:57 UTC
cvs commit: apr/test testpools.c
trawick 2002/10/23 07:19:57
Modified: test testpools.c
Log:
change to a more appropriate CuAssert* call
Revision Changes Path
1.5 +1 -1 apr/test/testpools.c
Index: testpools.c
===================================================================
RCS file: /home/cvs/apr/test/testpools.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- testpools.c 22 Oct 2002 23:22:06 -0000 1.4
+++ testpools.c 23 Oct 2002 14:19:57 -0000 1.5
@@ -98,7 +98,7 @@
for (i=0;i<ALLOC_BYTES;i++) {
char *ptr = alloc + i;
- CuAssertPtrEquals(tc, NULL, *ptr);
+ CuAssertTrue(tc, *ptr == '\0');
}
}
Re: cvs commit: apr/test testpools.c
Posted by rb...@apache.org.
On 23 Oct 2002, Jeff Trawick wrote:
> rbb@apache.org writes:
>
> > I actually considered doing this, but I don't believe that it is a good
> > idea. The problem is the amount of information you get if things
> > fail. With this change you get:
> >
> > 50 tests run: 49 passed, 1 failed, 0 not implemented.
> > Failed tests:
> > 1) calloc_bytes: assert failed
> >
> > Without it, you get:
> >
> > 50 tests run: 49 passed, 1 failed, 0 not implemented.
> > Failed tests:
> > 1) calloc_bytes: expected pointer <(nil)> but was <0x61>
> >
> > I would mucch rather have the added information.
>
> The previous code was not valid C.
>
> "testpools.c", line 101.37: 1506-280 (S) Function argument assignment
> between types "void*" and "char" is not allowed.
>
> Maybe you want to add an appropriate flavor of CuAssert that checks
> characters?
Ok, I'll get this fixed today.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------
Re: cvs commit: apr/test testpools.c
Posted by rb...@apache.org.
On 23 Oct 2002, Jeff Trawick wrote:
> rbb@apache.org writes:
>
> > I actually considered doing this, but I don't believe that it is a good
> > idea. The problem is the amount of information you get if things
> > fail. With this change you get:
> >
> > 50 tests run: 49 passed, 1 failed, 0 not implemented.
> > Failed tests:
> > 1) calloc_bytes: assert failed
> >
> > Without it, you get:
> >
> > 50 tests run: 49 passed, 1 failed, 0 not implemented.
> > Failed tests:
> > 1) calloc_bytes: expected pointer <(nil)> but was <0x61>
> >
> > I would mucch rather have the added information.
>
> The previous code was not valid C.
>
> "testpools.c", line 101.37: 1506-280 (S) Function argument assignment
> between types "void*" and "char" is not allowed.
>
> Maybe you want to add an appropriate flavor of CuAssert that checks
> characters?
Ok, I'll get this fixed today.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------
Re: cvs commit: apr/test testpools.c
Posted by Jeff Trawick <tr...@attglobal.net>.
rbb@apache.org writes:
> I actually considered doing this, but I don't believe that it is a good
> idea. The problem is the amount of information you get if things
> fail. With this change you get:
>
> 50 tests run: 49 passed, 1 failed, 0 not implemented.
> Failed tests:
> 1) calloc_bytes: assert failed
>
> Without it, you get:
>
> 50 tests run: 49 passed, 1 failed, 0 not implemented.
> Failed tests:
> 1) calloc_bytes: expected pointer <(nil)> but was <0x61>
>
> I would mucch rather have the added information.
The previous code was not valid C.
"testpools.c", line 101.37: 1506-280 (S) Function argument assignment
between types "void*" and "char" is not allowed.
Maybe you want to add an appropriate flavor of CuAssert that checks
characters?
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...
Re: cvs commit: apr/test testpools.c
Posted by Jeff Trawick <tr...@attglobal.net>.
rbb@apache.org writes:
> I actually considered doing this, but I don't believe that it is a good
> idea. The problem is the amount of information you get if things
> fail. With this change you get:
>
> 50 tests run: 49 passed, 1 failed, 0 not implemented.
> Failed tests:
> 1) calloc_bytes: assert failed
>
> Without it, you get:
>
> 50 tests run: 49 passed, 1 failed, 0 not implemented.
> Failed tests:
> 1) calloc_bytes: expected pointer <(nil)> but was <0x61>
>
> I would mucch rather have the added information.
The previous code was not valid C.
"testpools.c", line 101.37: 1506-280 (S) Function argument assignment
between types "void*" and "char" is not allowed.
Maybe you want to add an appropriate flavor of CuAssert that checks
characters?
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...
Re: cvs commit: apr/test testpools.c
Posted by rb...@apache.org.
On 23 Oct 2002 trawick@apache.org wrote:
> trawick 2002/10/23 07:19:57
>
> Modified: test testpools.c
> Log:
> change to a more appropriate CuAssert* call
>
> Revision Changes Path
> 1.5 +1 -1 apr/test/testpools.c
>
> Index: testpools.c
> ===================================================================
> RCS file: /home/cvs/apr/test/testpools.c,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- testpools.c 22 Oct 2002 23:22:06 -0000 1.4
> +++ testpools.c 23 Oct 2002 14:19:57 -0000 1.5
> @@ -98,7 +98,7 @@
>
> for (i=0;i<ALLOC_BYTES;i++) {
> char *ptr = alloc + i;
> - CuAssertPtrEquals(tc, NULL, *ptr);
> + CuAssertTrue(tc, *ptr == '\0');
I actually considered doing this, but I don't believe that it is a good
idea. The problem is the amount of information you get if things
fail. With this change you get:
50 tests run: 49 passed, 1 failed, 0 not implemented.
Failed tests:
1) calloc_bytes: assert failed
Without it, you get:
50 tests run: 49 passed, 1 failed, 0 not implemented.
Failed tests:
1) calloc_bytes: expected pointer <(nil)> but was <0x61>
I would mucch rather have the added information.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------
Re: cvs commit: apr/test testpools.c
Posted by rb...@apache.org.
On 23 Oct 2002 trawick@apache.org wrote:
> trawick 2002/10/23 07:19:57
>
> Modified: test testpools.c
> Log:
> change to a more appropriate CuAssert* call
>
> Revision Changes Path
> 1.5 +1 -1 apr/test/testpools.c
>
> Index: testpools.c
> ===================================================================
> RCS file: /home/cvs/apr/test/testpools.c,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- testpools.c 22 Oct 2002 23:22:06 -0000 1.4
> +++ testpools.c 23 Oct 2002 14:19:57 -0000 1.5
> @@ -98,7 +98,7 @@
>
> for (i=0;i<ALLOC_BYTES;i++) {
> char *ptr = alloc + i;
> - CuAssertPtrEquals(tc, NULL, *ptr);
> + CuAssertTrue(tc, *ptr == '\0');
I actually considered doing this, but I don't believe that it is a good
idea. The problem is the amount of information you get if things
fail. With this change you get:
50 tests run: 49 passed, 1 failed, 0 not implemented.
Failed tests:
1) calloc_bytes: assert failed
Without it, you get:
50 tests run: 49 passed, 1 failed, 0 not implemented.
Failed tests:
1) calloc_bytes: expected pointer <(nil)> but was <0x61>
I would mucch rather have the added information.
Ryan
_______________________________________________________________________________
Ryan Bloom rbb@apache.org
550 Jean St
Oakland CA 94610
-------------------------------------------------------------------------------