]> git.ozlabs.org Git - ccan/commitdiff
ccanlint: fix total score for running examples
authorRusty Russell <rusty@rustcorp.com.au>
Sat, 8 Jan 2011 09:39:25 +0000 (20:09 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 8 Jan 2011 09:39:25 +0000 (20:09 +1030)
Don't count examples which didn't compile (expected, as we mangle them in
various different ways).

tools/ccanlint/tests/examples_run.c

index 077ea2487b431a1f365702f94b9ff4f78473df5d..6418d833bfcd6126c786f37c4e5b28fbac5a70c3 100644 (file)
@@ -248,10 +248,10 @@ static void run_examples(struct manifest *m, bool keep,
                                     expect = find_expect(i, lines, &input,
                                                          &exact, &linenum)) {
                                char *err;
-                               score->total++;
                                if (i->compiled == NULL)
                                        continue;
 
+                               score->total++;
                                output = unexpected(i, input, expect, exact);
                                if (!output) {
                                        score->score++;