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 tests/lint: move description of te...



details:   https://anonhg.NetBSD.org/src/rev/2589f074c1b1
branches:  trunk
changeset: 954007:2589f074c1b1
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Mar 27 13:59:18 2021 +0000

description:
tests/lint: move description of tests into the tests themselves

In most cases the descriptions didn't add much to the test name anyway.

diffstat:

 tests/usr.bin/xlint/lint1/d_c99_complex_split.c        |   7 +-
 tests/usr.bin/xlint/lint1/d_cast_lhs.c                 |   9 ++-
 tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c       |   4 +-
 tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c |   4 +-
 tests/usr.bin/xlint/lint1/d_nolimit_init.c             |   9 +-
 tests/usr.bin/xlint/lint1/t_integration.sh             |  60 ++++++-----------
 6 files changed, 47 insertions(+), 46 deletions(-)

diffs (166 lines):

diff -r bee04a11873c -r 2589f074c1b1 tests/usr.bin/xlint/lint1/d_c99_complex_split.c
--- a/tests/usr.bin/xlint/lint1/d_c99_complex_split.c   Sat Mar 27 13:28:03 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_complex_split.c   Sat Mar 27 13:59:18 2021 +0000
@@ -1,6 +1,11 @@
-/*     $NetBSD: d_c99_complex_split.c,v 1.4 2021/01/31 14:57:28 rillig Exp $   */
+/*     $NetBSD: d_c99_complex_split.c,v 1.5 2021/03/27 13:59:18 rillig Exp $   */
 # 3 "d_c99_complex_split.c"
 
+/*
+ * Checks that the real and imaginary parts of a complex number can be
+ * accessed (since C99).
+ */
+
 int
 b(double a)
 {
diff -r bee04a11873c -r 2589f074c1b1 tests/usr.bin/xlint/lint1/d_cast_lhs.c
--- a/tests/usr.bin/xlint/lint1/d_cast_lhs.c    Sat Mar 27 13:28:03 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_cast_lhs.c    Sat Mar 27 13:59:18 2021 +0000
@@ -1,7 +1,12 @@
-/*     $NetBSD: d_cast_lhs.c,v 1.3 2021/01/31 14:57:28 rillig Exp $    */
+/*     $NetBSD: d_cast_lhs.c,v 1.4 2021/03/27 13:59:18 rillig Exp $    */
 # 3 "d_cast_lhs.c"
 
-/* pointer casts are valid lhs lvalues */
+/*
+ * pointer casts are valid lhs lvalues
+ *
+ * XXX: C99 6.5.4 "Cast operators" footnote 85 says "A cast does not yield an
+ * lvalue".  It does not mention any exceptional rule for pointers.
+ */
 struct sockaddr {
 };
 
diff -r bee04a11873c -r 2589f074c1b1 tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c
--- a/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c  Sat Mar 27 13:28:03 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_ellipsis_in_switch.c  Sat Mar 27 13:59:18 2021 +0000
@@ -1,6 +1,8 @@
-/*     $NetBSD: d_ellipsis_in_switch.c,v 1.3 2021/01/31 14:57:28 rillig Exp $  */
+/*     $NetBSD: d_ellipsis_in_switch.c,v 1.4 2021/03/27 13:59:18 rillig Exp $  */
 # 3 "d_ellipsis_in_switch.c"
 
+/* Using a range in a case label is a GCC extension. */
+
 int
 x(void)
 {
diff -r bee04a11873c -r 2589f074c1b1 tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c
--- a/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c    Sat Mar 27 13:28:03 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_gcc_compound_statements1.c    Sat Mar 27 13:59:18 2021 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: d_gcc_compound_statements1.c,v 1.3 2021/01/31 14:57:28 rillig Exp $    */
+/*     $NetBSD: d_gcc_compound_statements1.c,v 1.4 2021/03/27 13:59:18 rillig Exp $    */
 # 3 "d_gcc_compound_statements1.c"
 
-/* GCC compound statements */
+/* GCC compound statement with expression */
 
 foo(unsigned long z)
 {
diff -r bee04a11873c -r 2589f074c1b1 tests/usr.bin/xlint/lint1/d_nolimit_init.c
--- a/tests/usr.bin/xlint/lint1/d_nolimit_init.c        Sat Mar 27 13:28:03 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_nolimit_init.c        Sat Mar 27 13:59:18 2021 +0000
@@ -1,7 +1,10 @@
-/*     $NetBSD: d_nolimit_init.c,v 1.2 2021/01/31 14:39:31 rillig Exp $        */
+/*     $NetBSD: d_nolimit_init.c,v 1.3 2021/03/27 13:59:18 rillig Exp $        */
 # 3 "d_nolimit_init.c"
 
-/* no limit initializers */
-char foo[][4] = {
+/*
+ * no limit initializers, or as C99 calls it, initialization of an array of
+ * unknown size
+ */
+char weekday_names[][4] = {
        "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
 };
diff -r bee04a11873c -r 2589f074c1b1 tests/usr.bin/xlint/lint1/t_integration.sh
--- a/tests/usr.bin/xlint/lint1/t_integration.sh        Sat Mar 27 13:28:03 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/t_integration.sh        Sat Mar 27 13:59:18 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_integration.sh,v 1.35 2021/03/27 13:28:03 rillig Exp $
+# $NetBSD: t_integration.sh,v 1.36 2021/03/27 13:59:18 rillig Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -128,57 +128,43 @@
 test_case d_struct_init_nested
 
 test_case d_cast_init
-test_case d_cast_init2         "Checks cast initialization as the rhs of a" \
-                               "- operand"
-test_case d_cast_lhs           "Checks whether pointer casts are valid lhs" \
-                               "lvalues"
+test_case d_cast_init2
+test_case d_cast_lhs
 
-test_case d_gcc_func           "Checks GCC __FUNCTION__"
-test_case d_c99_func           "Checks C99 __func__"
+test_case d_gcc_func
+test_case d_c99_func
 
-test_case d_gcc_variable_array_init "Checks GCC variable array initializers"
+test_case d_gcc_variable_array_init
 test_case d_c9x_array_init
 test_case d_c99_decls_after_stmt
 test_case d_c99_decls_after_stmt3
-test_case d_nolimit_init       "Checks no limit initializers"
+test_case d_nolimit_init
 test_case d_zero_sized_arrays
 
 test_case d_compound_literals1
 test_case d_compound_literals2
 test_case d_gcc_compound_statements1
-test_case d_gcc_compound_statements2 "Checks GCC compound statements with" \
-                               "non-expressions"
-test_case d_gcc_compound_statements3 "Checks GCC compound statements with" \
-                               "void type"
+test_case d_gcc_compound_statements2
+test_case d_gcc_compound_statements3
+
 # XXX: Because of polymorphic __builtin_isnan and expression has null effect
 # test_case gcc_extension "Checks GCC __extension__ and __typeof__"
 
-test_case d_cvt_in_ternary     "Checks CVT nodes handling in ?"
-test_case d_cvt_constant               "Checks constant conversion"
-test_case d_ellipsis_in_switch "Checks ellipsis in switch()"
-test_case d_c99_complex_num    "Checks C99 complex numbers"
-test_case d_c99_complex_split  "Checks C99 complex access"
+test_case d_cvt_in_ternary
+test_case d_cvt_constant
+test_case d_ellipsis_in_switch
+test_case d_c99_complex_num
+test_case d_c99_complex_split
 test_case d_c99_for_loops
-test_case d_alignof            "Checks __alignof__"
-test_case d_shift_to_narrower_type "Checks that type shifts that result in" \
-                               "narrower types do not produce warnings"
-
-test_case d_constant_conv1     "Checks failing on information-losing" \
-                               "constant conversion in argument lists"
-test_case d_constant_conv2     "Checks failing on information-losing" \
-                               "constant conversion in argument lists"
-
-test_case d_type_conv1         "Checks failing on information-losing" \
-                               "type conversion in argument lists"
-test_case d_type_conv2         "Checks failing on information-losing" \
-                               "type conversion in argument lists"
-test_case d_type_conv3         "Checks failing on information-losing" \
-                               "type conversion in argument lists"
-
+test_case d_alignof
+test_case d_shift_to_narrower_type
+test_case d_constant_conv1
+test_case d_constant_conv2
+test_case d_type_conv1
+test_case d_type_conv2
+test_case d_type_conv3
 test_case d_incorrect_array_size
-
-test_case d_long_double_int    "Checks for confusion of 'long double' with" \
-                               "'long int'; PR bin/39639"
+test_case d_long_double_int
 
 test_case all_messages
 all_messages_body()



Home | Main Index | Thread Index | Old Index