-
The head declared the wrong name for the mock_ function.
2009-07-12 03:57:12 UTC in Cgreen
-
That's a good patch. I didn't recognize that a suite initially has no tests array allocated.
It's good to have a nice package and people who look after its quality.
Nice work!
2009-07-03 01:13:25 UTC in Cgreen
-
Oh yeah - the SEGV occurs (on Solaris) running the sample test that's in my first post. Here it is, again:
#include "cgreen/cgreen.h"
#include <string.h>
static void strlen_of_hello_should_be_five() {
assert_equal(strlen("Hello"), 5);
}
TestSuite *our_tests() {
TestSuite *suite = create_test_suite();
add_test(suite...
2009-07-01 01:37:04 UTC in Cgreen
-
I am pretty sure that the SEGV is specific to Solaris (maybe the sparc processor). If you have something like watchmalloc.so that adds heap checks, it complains at the same point that I get SEGV on Solaris.
I don't have another unix system to try at the moment. I may try compiling on Windows, but only if I get my deliverables finished :-o
Thanks!
John.
2009-07-01 01:35:16 UTC in Cgreen
-
I think I undertand a bit of the flow, so I believe the destroy function should free test suites recursively. This patch works for me:
Index: src/unit.c
===================================================================
--- src/unit.c (revision 300)
+++ src/unit.c (working copy)
@@ -63,10 +63,9 @@
for (i = 0; i < suiteToDestroy->size; i++) {
UnitTest...
2009-06-29 19:08:33 UTC in Cgreen
-
I'm still getting SEGV at the same line when the test suite is larger. I'll have to work on it more a bit later on.
2009-06-28 21:43:41 UTC in Cgreen
-
With this patch, the trivial test no longer has SEGV. I think a complete fix probably needs to be recursive, since a suite may contain another suite. I haven't become familiar with the flow of control, so that may already be handled.
Index: src/unit.c
===================================================================
--- src/unit.c (revision 300)
+++ src/unit.c (working copy)
@@...
2009-06-28 21:32:02 UTC in Cgreen
-
Hi,
I'm just starting to look into CGreen and I realize it may have problems on Solaris 10 that I need to address. I hope you can give me some guidance as I debug this problem. The sample strlen test from the tutorial ends with a SEGV:
Running "our_tests"...
Completed "our_tests": 1 pass, 0 failures, 0 exceptions.
Segmentation Fault (core dumped)
The stack shows...
2009-06-28 20:46:34 UTC in Cgreen
-
I'm assuming that the Makefile is managed by Cmake, which I'm not familiar with. It would be nice if the initial Makefile were more portable. (Haven't tried automake.)
I'm not using the collector, so the following patch is sufficient to get samples/sample to run as expected. I recommend removing the test target from samples/Makefile since it results in a failure when the sample runs as...
2009-06-26 20:30:47 UTC in Cgreen
-
Hi,
I'm building CGreen for Solaris 10. The gcc (3.4.6) here is generating .o files in the current directory, rather than in the directory of the input file (src/). I think this is a dependency on Linux/Cygwin make, though I wonder if this is an indication that I'll need a different gcc.
For now, I'll add a .c.o:
$(CC) $(CFLAGS) -o $(>) $(<)
I have referencee Cgreen in my...
2009-06-26 17:29:28 UTC in Cgreen