Source-Changes-HG archive

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

[src/trunk]: src/tests/usr.bin/indent tests/indent: clean up comments



details:   https://anonhg.NetBSD.org/src/rev/d0101305f8e1
branches:  trunk
changeset: 376208:d0101305f8e1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jun 04 19:28:54 2023 +0000

description:
tests/indent: clean up comments

diffstat:

 tests/usr.bin/indent/lex_ident.c      |  8 +++-----
 tests/usr.bin/indent/lsym_binary_op.c |  8 ++++----
 tests/usr.bin/indent/opt_badp.c       |  7 ++++---
 3 files changed, 11 insertions(+), 12 deletions(-)

diffs (67 lines):

diff -r 1888565df1a1 -r d0101305f8e1 tests/usr.bin/indent/lex_ident.c
--- a/tests/usr.bin/indent/lex_ident.c  Sun Jun 04 19:08:49 2023 +0000
+++ b/tests/usr.bin/indent/lex_ident.c  Sun Jun 04 19:28:54 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex_ident.c,v 1.6 2023/05/15 17:28:14 rillig Exp $ */
+/* $NetBSD: lex_ident.c,v 1.7 2023/06/04 19:28:54 rillig Exp $ */
 
 /*
  * Test lexing of word-like tokens, such as keywords, identifiers, numeric
@@ -19,15 +19,13 @@ iable;
 int
        no_backslash;
 
-/* $ See check_size_token. */
-/* $ The default buffer size is 200, the limit is 195. */
+// $ Test long identifiers, to cover the code that expands a buffer first to
+// $ more than 400 bytes and then to more than 1400 bytes.
 struct long_tag_name_to_overflow_the_token_buffer_4567890\
 12345678901234567890123456789012345678901234567890\
 12345678901234567890123456789012345678901234567890\
 12345678901234567890123456789012345678901234567890;
 
-/* $ See check_size_token. */
-/* $ The difference between limit and start got incremented to 595. */
 struct long_tag_name_to_overflow_the_token_buffer_4567890\
 12345678901234567890123456789012345678901234567890\
 12345678901234567890123456789012345678901234567890\
diff -r 1888565df1a1 -r d0101305f8e1 tests/usr.bin/indent/lsym_binary_op.c
--- a/tests/usr.bin/indent/lsym_binary_op.c     Sun Jun 04 19:08:49 2023 +0000
+++ b/tests/usr.bin/indent/lsym_binary_op.c     Sun Jun 04 19:28:54 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_binary_op.c,v 1.7 2023/05/13 06:52:48 rillig Exp $ */
+/* $NetBSD: lsym_binary_op.c,v 1.8 2023/06/04 19:28:54 rillig Exp $ */
 
 /*
  * Tests for the token lsym_binary_op, which represents a binary operator in
@@ -82,9 +82,9 @@ int var = expr * *ptr;
  * arbitrary amount of '='.  This is used for operators like '&&' or
  * '|||==='.
  *
- * Before 2021-03-07 22:11:01, the comment '//' was treated as an
- * operator as well, and so was the comment '/////', leading to
- * unexpected results.
+ * Before 2021-03-07 22:11:01, the comment '//' was treated as a binary
+ * operator as well, and so was the comment '/////', leading to unexpected
+ * spacing.
  *
  * See lexi.c, lexi, "default:".
  */
diff -r 1888565df1a1 -r d0101305f8e1 tests/usr.bin/indent/opt_badp.c
--- a/tests/usr.bin/indent/opt_badp.c   Sun Jun 04 19:08:49 2023 +0000
+++ b/tests/usr.bin/indent/opt_badp.c   Sun Jun 04 19:28:54 2023 +0000
@@ -1,10 +1,11 @@
-/* $NetBSD: opt_badp.c,v 1.11 2023/05/15 09:05:08 rillig Exp $ */
+/* $NetBSD: opt_badp.c,v 1.12 2023/06/04 19:28:54 rillig Exp $ */
 
 /*
  * Tests for the options '-badp' and '-nbadp'.
  *
- * The option '-badp' forces a blank line after the first set of declarations
- * in a function. It produces a blank line even if there are no declarations.
+ * The option '-badp' forces a blank line between the first set of declarations
+ * in a function and the next comment or statement. It produces a blank line
+ * even if there are no declarations.
  */
 
 //indent input



Home | Main Index | Thread Index | Old Index