Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 add a test for the bug I fixed yes...



details:   https://anonhg.NetBSD.org/src/rev/b4bc1634794b
branches:  trunk
changeset: 332527:b4bc1634794b
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Sep 26 15:27:12 2014 +0000

description:
add a test for the bug I fixed yesterday, and explain the tests.

diffstat:

 tests/usr.bin/xlint/lint1/d_c99_for_loops.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r 7a737c8eb20d -r b4bc1634794b tests/usr.bin/xlint/lint1/d_c99_for_loops.c
--- a/tests/usr.bin/xlint/lint1/d_c99_for_loops.c       Fri Sep 26 15:26:01 2014 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_for_loops.c       Fri Sep 26 15:27:12 2014 +0000
@@ -4,7 +4,12 @@
 int
 main(void)
 {
+       // Test the basic functionality
        for (int i = 0; i < 10; i++)
                foo(i);
+
+       // Test that the scope of the iterator is correct
+       for (int i = 0; i < 10; i++)
+               continue;
        return 0;
 }



Home | Main Index | Thread Index | Old Index