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: test deeply nested struct...



details:   https://anonhg.NetBSD.org/src/rev/5212f4e6bdc2
branches:  trunk
changeset: 987379:5212f4e6bdc2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Sep 25 13:04:55 2021 +0000

description:
tests/indent: test deeply nested struct declarations

diffstat:

 distrib/sets/lists/tests/mi                |   3 +-
 tests/usr.bin/indent/Makefile              |   3 +-
 tests/usr.bin/indent/declarations.0        |  52 +++++++++++++++++++++++++++++-
 tests/usr.bin/indent/declarations.0.stderr |   5 ++
 tests/usr.bin/indent/declarations.0.stdout |  52 +++++++++++++++++++++++++++++-
 5 files changed, 111 insertions(+), 4 deletions(-)

diffs (169 lines):

diff -r 5e3d3efb1dac -r 5212f4e6bdc2 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sat Sep 25 12:47:17 2021 +0000
+++ b/distrib/sets/lists/tests/mi       Sat Sep 25 13:04:55 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1128 2021/09/25 12:20:44 rillig Exp $
+# $NetBSD: mi,v 1.1129 2021/09/25 13:06:05 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4739,6 +4739,7 @@
 ./usr/tests/usr.bin/indent/cs.0.pro                                    tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/cs.0.stdout                                 tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/declarations.0                              tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/declarations.0.stderr                       tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/declarations.0.stdout                       tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/elsecomment.0                               tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/elsecomment.0.pro                           tests-usr.bin-tests     compattestfile,atf
diff -r 5e3d3efb1dac -r 5212f4e6bdc2 tests/usr.bin/indent/Makefile
--- a/tests/usr.bin/indent/Makefile     Sat Sep 25 12:47:17 2021 +0000
+++ b/tests/usr.bin/indent/Makefile     Sat Sep 25 13:04:55 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.10 2021/09/25 12:20:44 rillig Exp $
+#      $NetBSD: Makefile,v 1.11 2021/09/25 13:04:55 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -16,6 +16,7 @@
 FILES+=                comments.0.pro
 FILES+=                comments.0.stdout
 FILES+=                declarations.0
+FILES+=                declarations.0.stderr
 FILES+=                declarations.0.stdout
 FILES+=                elsecomment.0
 FILES+=                elsecomment.0.stdout
diff -r 5e3d3efb1dac -r 5212f4e6bdc2 tests/usr.bin/indent/declarations.0
--- a/tests/usr.bin/indent/declarations.0       Sat Sep 25 12:47:17 2021 +0000
+++ b/tests/usr.bin/indent/declarations.0       Sat Sep 25 13:04:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: declarations.0,v 1.2 2021/03/06 19:51:24 rillig Exp $  */
+/*     $NetBSD: declarations.0,v 1.3 2021/09/25 13:04:55 rillig Exp $  */
 /* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */
 /* See r303570 */
 
@@ -78,3 +78,53 @@
 {
 
 }
+
+/* Trigger the warning about nested struct declarations. */
+struct s01 {
+struct s02 {
+struct s03 {
+struct s04 {
+struct s05 {
+struct s06 {
+struct s07 {
+struct s08 {
+struct s09 {
+struct s00 {
+struct s11 {
+struct s12 {
+struct s13 {
+struct s14 {
+struct s15 {
+struct s16 {
+struct s17 {
+struct s18 {
+struct s19 {
+struct s20 {
+struct s21 {
+struct s22 {
+struct s23 {
+struct s24 {
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
+};
diff -r 5e3d3efb1dac -r 5212f4e6bdc2 tests/usr.bin/indent/declarations.0.stderr
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/indent/declarations.0.stderr        Sat Sep 25 13:04:55 2021 +0000
@@ -0,0 +1,5 @@
+/**INDENT** Warning@95: Reached internal limit of 20 struct levels */
+/**INDENT** Warning@96: Reached internal limit of 20 struct levels */
+/**INDENT** Warning@97: Reached internal limit of 20 struct levels */
+/**INDENT** Warning@98: Reached internal limit of 20 struct levels */
+/**INDENT** Warning@99: Reached internal limit of 20 struct levels */
diff -r 5e3d3efb1dac -r 5212f4e6bdc2 tests/usr.bin/indent/declarations.0.stdout
--- a/tests/usr.bin/indent/declarations.0.stdout        Sat Sep 25 12:47:17 2021 +0000
+++ b/tests/usr.bin/indent/declarations.0.stdout        Sat Sep 25 13:04:55 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: declarations.0.stdout,v 1.1 2019/04/04 15:27:35 kamil Exp $    */
+/*     $NetBSD: declarations.0.stdout,v 1.2 2021/09/25 13:04:55 rillig Exp $   */
 /* $FreeBSD: head/usr.bin/indent/tests/declarations.0.stdout 334480 2018-06-01 09:58:44Z pstef $ */
 /* See r303570 */
 
@@ -72,3 +72,53 @@
 {
 
 }
+
+/* Trigger the warning about nested struct declarations. */
+struct s01 {
+       struct s02 {
+               struct s03 {
+                       struct s04 {
+                               struct s05 {
+                                       struct s06 {
+                                               struct s07 {
+                                                       struct s08 {
+                                                               struct s09 {
+                                                                       struct s00 {
+                                                                               struct s11 {
+                                                                                       struct s12 {
+                                                                                               struct s13 {
+                                                                                                       struct s14 {
+                                                                                                               struct s15 {
+                                                                                                                       struct s16 {
+                                                                                                                               struct s17 {
+                                                                                                                                       struct s18 {
+                                                                                                                                               struct s19 {
+                                                                                                                                                       struct s20 {
+                                                                                                                                                               struct s21 {
+                                                                                                                                                                       struct s22 {
+                                                                                                                                                                               struct s23 {
+                                                                                                                                                                                       struct s24 {
+                                                                                                                                                                                       };
+                                                                                                                                                                               };
+                                                                                                                                                                       };
+                                                                                                                                                               };
+                                                                                                                                                       };
+                                                                                                                                               };
+                                                                                                                                       };
+                                                                                                                               };
+                                                                                                                       };
+                                                                                                               };
+                                                                                                       };
+                                                                                               };
+                                                                                       };
+                                                                               };
+                                                                       };
+                                                               };
+                                                       };
+                                               };
+                                       };
+                               };
+                       };
+               };
+       };
+};



Home | Main Index | Thread Index | Old Index