Source-Changes-HG archive

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

[src/trunk]: src lint1: add forgotten tests



details:   https://anonhg.NetBSD.org/src/rev/75428911fc17
branches:  trunk
changeset: 958194:75428911fc17
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 28 12:47:39 2020 +0000

description:
lint1: add forgotten tests

diffstat:

 distrib/sets/lists/tests/mi                    |   4 +++-
 tests/usr.bin/xlint/lint1/Makefile             |   4 +++-
 tests/usr.bin/xlint/lint1/d_c99_union_cast.exp |   1 +
 tests/usr.bin/xlint/lint1/d_gcc_extension.exp  |   2 ++
 tests/usr.bin/xlint/lint1/t_integration.sh     |  22 ++++++++++++++++++++--
 5 files changed, 29 insertions(+), 4 deletions(-)

diffs (104 lines):

diff -r 4c382c7aff13 -r 75428911fc17 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Mon Dec 28 12:38:44 2020 +0000
+++ b/distrib/sets/lists/tests/mi       Mon Dec 28 12:47:39 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.998 2020/12/28 11:40:54 rillig Exp $
+# $NetBSD: mi,v 1.999 2020/12/28 12:47:39 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5750,6 +5750,7 @@
 ./usr/tests/usr.bin/xlint/lint1/d_c99_recursive_init.c         tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_struct_init.c            tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_union_cast.c             tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp           tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_union_init1.c            tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_union_init2.c            tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_union_init3.c            tests-usr.bin-tests     compattestfile,atf
@@ -5775,6 +5776,7 @@
 ./usr/tests/usr.bin/xlint/lint1/d_gcc_compound_statements2.c   tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_gcc_compound_statements3.c   tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_gcc_extension.c              tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/d_gcc_extension.exp            tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_gcc_func.c                   tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_gcc_variable_array_init.c    tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_incorrect_array_size.c       tests-usr.bin-tests     compattestfile,atf
diff -r 4c382c7aff13 -r 75428911fc17 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile        Mon Dec 28 12:38:44 2020 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile        Mon Dec 28 12:47:39 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.19 2020/12/28 11:19:01 rillig Exp $
+# $NetBSD: Makefile,v 1.20 2020/12/28 12:47:39 rillig Exp $
 
 NOMAN=         # defined
 
@@ -26,6 +26,7 @@
 FILES+=                d_c99_recursive_init.c
 FILES+=                d_c99_struct_init.c
 FILES+=                d_c99_union_cast.c
+FILES+=                d_c99_union_cast.exp
 FILES+=                d_c99_union_init1.c
 FILES+=                d_c99_union_init2.c
 FILES+=                d_c99_union_init3.c
@@ -51,6 +52,7 @@
 FILES+=                d_gcc_compound_statements2.c
 FILES+=                d_gcc_compound_statements3.c
 FILES+=                d_gcc_extension.c
+FILES+=                d_gcc_extension.exp
 FILES+=                d_gcc_func.c
 FILES+=                d_gcc_variable_array_init.c
 FILES+=                d_incorrect_array_size.c
diff -r 4c382c7aff13 -r 75428911fc17 tests/usr.bin/xlint/lint1/d_c99_union_cast.exp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_union_cast.exp    Mon Dec 28 12:47:39 2020 +0000
@@ -0,0 +1,1 @@
+(18): warning: a unused in function foo [192]
diff -r 4c382c7aff13 -r 75428911fc17 tests/usr.bin/xlint/lint1/d_gcc_extension.exp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/d_gcc_extension.exp     Mon Dec 28 12:47:39 2020 +0000
@@ -0,0 +1,2 @@
+(7): warning: conversion to 'long double' due to prototype, arg #1 [259]
+(7): warning: conversion to 'long double' due to prototype, arg #1 [259]
diff -r 4c382c7aff13 -r 75428911fc17 tests/usr.bin/xlint/lint1/t_integration.sh
--- a/tests/usr.bin/xlint/lint1/t_integration.sh        Mon Dec 28 12:38:44 2020 +0000
+++ b/tests/usr.bin/xlint/lint1/t_integration.sh        Mon Dec 28 12:47:39 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_integration.sh,v 1.10 2020/12/28 12:17:23 rillig Exp $
+# $NetBSD: t_integration.sh,v 1.11 2020/12/28 12:47:39 rillig Exp $
 #
 # Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -50,7 +50,9 @@
 
        atf_test_case ${name}
        eval "${name}_head() {
-               atf_set \"descr\" \"${descr}\"
+               if [ \"${descr}\" ]; then
+                       atf_set \"descr\" \"${descr}\"
+               fi
                atf_set \"require.progs\" \"${LINT1}\"
        }"
        eval "${name}_body() {
@@ -60,6 +62,22 @@
        Names="${Names} ${name}"
 }
 
+test_case bltinoffsetof
+test_case c99_anon_struct
+test_case c99_anon_union
+test_case c99_compound_literal_comma
+test_case c99_decls_after_stmt2
+test_case c99_flex_array_packed
+test_case c99_nested_struct
+test_case c99_union_cast
+test_case c99_union_init4
+test_case cast_fun_array_param
+test_case cast_typeof
+test_case gcc_extension
+test_case type_question_colon
+test_case typefun
+test_case typename_as_var
+
 test_case c99_struct_init      "Checks C99 struct initialization"
 test_case c99_union_init1      "Checks C99 union initialization"
 test_case c99_union_init2      "Checks C99 union initialization"



Home | Main Index | Thread Index | Old Index