aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
authorJosh Triplett <josh@freedesktop.org>2007-07-08 12:54:35 -0700
committerJosh Triplett <josh@freedesktop.org>2007-07-08 12:55:44 -0700
commit87a0b56ae4d2476a8baf39a079548648199a35eb (patch)
tree839bd3f9ed71c2206c7f439423d308ee9d364bb4
parentab1ac7453069494fb498400cdcb319bc17520b59 (diff)
downloadsparse-dev-87a0b56ae4d2476a8baf39a079548648199a35eb.tar.gz
validation: Update comments for current Sparse behavior and test-suite.
Remove information redundant with the test-suite comments, such as expected output, and update comments that disagree with current Sparse behavior, such as saying that Sparse gets a test wrong when it no longer does. Signed-off-by: Josh Triplett <josh@freedesktop.org>
-rw-r--r--validation/preprocessor/preprocessor1.c12
-rw-r--r--validation/preprocessor/preprocessor2.c9
-rw-r--r--validation/preprocessor/preprocessor3.c24
3 files changed, 4 insertions, 41 deletions
diff --git a/validation/preprocessor/preprocessor1.c b/validation/preprocessor/preprocessor1.c
index a02ccf6f..daed1264 100644
--- a/validation/preprocessor/preprocessor1.c
+++ b/validation/preprocessor/preprocessor1.c
@@ -1,20 +1,10 @@
-/*
- * This makes us really hurl chunks, causing
- * infinite recursion until we run out of stack.
- *
- * It _should_ result in just a single plain
- *
- * "foo"
- *
- * (without the quotes).
- */
#define func(x) x
#define bar func(
#define foo bar foo
foo )
/*
* check-name: Preprocessor #1
- *
+ * check-description: Used to cause infinite recursion.
* check-command: sparse -E $file
* check-exit-value: 0
*
diff --git a/validation/preprocessor/preprocessor2.c b/validation/preprocessor/preprocessor2.c
index c95641d4..ebe2501e 100644
--- a/validation/preprocessor/preprocessor2.c
+++ b/validation/preprocessor/preprocessor2.c
@@ -1,12 +1,3 @@
-/*
- * This one we happen to get right.
- *
- * It should result in a simple
- *
- * a + b
- *
- * for a proper preprocessor.
- */
#define TWO a, b
#define UNARY(x) BINARY(x)
diff --git a/validation/preprocessor/preprocessor3.c b/validation/preprocessor/preprocessor3.c
index 0735667d..0d26ecea 100644
--- a/validation/preprocessor/preprocessor3.c
+++ b/validation/preprocessor/preprocessor3.c
@@ -1,24 +1,6 @@
/*
- * We get this one wrong too.
- *
- * It should result in a sequence
- *
- * B ( )
- * A ( )
- * B ( )
- * A ( )
- *
- * because each iteration of the scanning of "SCAN()"
- * should re-evaluate the recursive B->A->B expansion.
- * But we never re-evaluate something that we noticed
- * was recursive. So we will cause it to evaluate to
- *
- * B ( )
- * A ( )
- * A ( )
- * A ( )
- *
- * Which is really quite wrong.
+ * Each iteration of the scanning of "SCAN()" re-evaluates the recursive
+ * B->A->B expansion.
*
* Did I already mention that the C preprocessor language
* is a perverse thing?
@@ -37,7 +19,7 @@ SCAN(SCAN( A() )) // B ( )
SCAN(SCAN(SCAN( A() ))) // A ( )
/*
* check-name: Preprocessor #3
- *
+ * check-description: Sparse used to get this wrong, outputting A third, not B.
* check-command: sparse -E $file
* check-exit-value: 0
*