From 61c9d68ece06175b1e529a6c512c5d795430a244 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Wed, 7 Apr 2021 16:06:12 +0200 Subject: [PATCH] [tests] fixes expected exit status in tests --- tests/pp/baddirective.cpp | 6 ++++++ tests/pp/baddirective2.cpp | 5 +++++ tests/pp/comment.cpp | 4 ++++ tests/pp/define.cpp | 5 +++++ tests/pp/define2.cpp | 5 +++++ tests/pp/empty.cpp | 4 ++++ tests/pp/empty2.cpp | 4 ++++ tests/pp/empty3.cpp | 4 ++++ tests/pp/oracle/baddirective.err.oracle | 2 +- tests/pp/oracle/baddirective2.err.oracle | 2 +- tests/pp/oracle/comment.err.oracle | 2 +- tests/pp/oracle/define.err.oracle | 2 +- tests/pp/oracle/define2.err.oracle | 2 +- tests/pp/oracle/empty.err.oracle | 2 +- tests/pp/oracle/empty2.err.oracle | 2 +- tests/pp/oracle/empty3.err.oracle | 2 +- tests/pp/oracle/pragma.err.oracle | 2 +- tests/pp/oracle/valid_function1.res.oracle | 2 +- tests/pp/oracle/valid_function2.res.oracle | 2 +- tests/pp/pragma.cpp | 4 ++++ tests/pp/valid_function1.cpp | 4 ++++ tests/pp/valid_function2.cpp | 4 ++++ 22 files changed, 60 insertions(+), 11 deletions(-) diff --git a/tests/pp/baddirective.cpp b/tests/pp/baddirective.cpp index ff95b992..cb8ecace 100644 --- a/tests/pp/baddirective.cpp +++ b/tests/pp/baddirective.cpp @@ -1,4 +1,10 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ + // Tests a misspelled directive + /*@ requires \true; diff --git a/tests/pp/baddirective2.cpp b/tests/pp/baddirective2.cpp index 65625a90..8fed753b 100644 --- a/tests/pp/baddirective2.cpp +++ b/tests/pp/baddirective2.cpp @@ -1,3 +1,8 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ + // Tests a misspelled directive /*@ diff --git a/tests/pp/comment.cpp b/tests/pp/comment.cpp index 59894832..85055240 100644 --- a/tests/pp/comment.cpp +++ b/tests/pp/comment.cpp @@ -1,3 +1,7 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ // Tests a directive that just has a comment /*@ diff --git a/tests/pp/define.cpp b/tests/pp/define.cpp index e8f0f1eb..5254ee48 100644 --- a/tests/pp/define.cpp +++ b/tests/pp/define.cpp @@ -1,3 +1,8 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ + // Tests whether define directive is properly reported /*@ diff --git a/tests/pp/define2.cpp b/tests/pp/define2.cpp index ce554e96..7ec49ba6 100644 --- a/tests/pp/define2.cpp +++ b/tests/pp/define2.cpp @@ -1,3 +1,8 @@ +/* run.config +EXIT: 1 +STDOPT: +*/ + // Tests whether define directive is properly reported /*@ diff --git a/tests/pp/empty.cpp b/tests/pp/empty.cpp index d295e211..5f07b712 100644 --- a/tests/pp/empty.cpp +++ b/tests/pp/empty.cpp @@ -1,3 +1,7 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ // Tests an empty directive /*@ diff --git a/tests/pp/empty2.cpp b/tests/pp/empty2.cpp index c8561e0b..570db21a 100644 --- a/tests/pp/empty2.cpp +++ b/tests/pp/empty2.cpp @@ -1,3 +1,7 @@ +/* run.config* +EXIT:1 +STDOPT: +*/ // Tests an empty directive /*@ diff --git a/tests/pp/empty3.cpp b/tests/pp/empty3.cpp index 5d88de48..c31b3431 100644 --- a/tests/pp/empty3.cpp +++ b/tests/pp/empty3.cpp @@ -1,3 +1,7 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ // Tests an empty directive at end of line //@ # void m() {} diff --git a/tests/pp/oracle/baddirective.err.oracle b/tests/pp/oracle/baddirective.err.oracle index 4b3a771e..fc23daa1 100644 --- a/tests/pp/oracle/baddirective.err.oracle +++ b/tests/pp/oracle/baddirective.err.oracle @@ -1,4 +1,4 @@ -tests/pp/baddirective.cpp:5:5: error: [pp] Invalid preprocessor directive [zzzzz] (ignoring line): # zzzzz "Failure2" +tests/pp/baddirective.cpp:11:5: error: [pp] Invalid preprocessor directive [zzzzz] (ignoring line): # zzzzz "Failure2" # zzzzz "Failure2" ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/baddirective2.err.oracle b/tests/pp/oracle/baddirective2.err.oracle index b2e60058..03f4f4a1 100644 --- a/tests/pp/oracle/baddirective2.err.oracle +++ b/tests/pp/oracle/baddirective2.err.oracle @@ -1,4 +1,4 @@ -tests/pp/baddirective2.cpp:5:2: error: [pp] Invalid preprocessor directive [zzzzz] (ignoring line): #zzzzz "Failure2" +tests/pp/baddirective2.cpp:10:2: error: [pp] Invalid preprocessor directive [zzzzz] (ignoring line): #zzzzz "Failure2" #zzzzz "Failure2" ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/comment.err.oracle b/tests/pp/oracle/comment.err.oracle index 86cc5953..545c70b5 100644 --- a/tests/pp/oracle/comment.err.oracle +++ b/tests/pp/oracle/comment.err.oracle @@ -1,4 +1,4 @@ -tests/pp/comment.cpp:5:2: error: [pp] Missing preprocessor directive (ignoring line): # // asdasd +tests/pp/comment.cpp:9:2: error: [pp] Missing preprocessor directive (ignoring line): # // asdasd # // asdasd ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/define.err.oracle b/tests/pp/oracle/define.err.oracle index ba5416c6..66cc7e7f 100644 --- a/tests/pp/oracle/define.err.oracle +++ b/tests/pp/oracle/define.err.oracle @@ -1,4 +1,4 @@ -tests/pp/define.cpp:5:3: error: [pp] Preprocessor directive is not permitted in ACSL++ annotation (ignoring line): # define XX 0 +tests/pp/define.cpp:10:3: error: [pp] Preprocessor directive is not permitted in ACSL++ annotation (ignoring line): # define XX 0 # define XX 0 ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/define2.err.oracle b/tests/pp/oracle/define2.err.oracle index e5874af6..24bc9d4f 100644 --- a/tests/pp/oracle/define2.err.oracle +++ b/tests/pp/oracle/define2.err.oracle @@ -1,4 +1,4 @@ -tests/pp/define2.cpp:4:3: error: [pp] Preprocessor directive is not permitted in ACSL++ annotation (ignoring line): # define XX 0 +tests/pp/define2.cpp:9:3: error: [pp] Preprocessor directive is not permitted in ACSL++ annotation (ignoring line): # define XX 0 # define XX 0 ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/empty.err.oracle b/tests/pp/oracle/empty.err.oracle index d309dd21..c229f5f2 100644 --- a/tests/pp/oracle/empty.err.oracle +++ b/tests/pp/oracle/empty.err.oracle @@ -1,4 +1,4 @@ -tests/pp/empty.cpp:5:2: error: [pp] Missing preprocessor directive (ignoring line): # +tests/pp/empty.cpp:9:2: error: [pp] Missing preprocessor directive (ignoring line): # # ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/empty2.err.oracle b/tests/pp/oracle/empty2.err.oracle index 16a90cbe..a3059a27 100644 --- a/tests/pp/oracle/empty2.err.oracle +++ b/tests/pp/oracle/empty2.err.oracle @@ -1,4 +1,4 @@ -tests/pp/empty2.cpp:4:2: error: [pp] Missing preprocessor directive (ignoring line): # +tests/pp/empty2.cpp:8:2: error: [pp] Missing preprocessor directive (ignoring line): # # ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/empty3.err.oracle b/tests/pp/oracle/empty3.err.oracle index 27802de9..af46b371 100644 --- a/tests/pp/oracle/empty3.err.oracle +++ b/tests/pp/oracle/empty3.err.oracle @@ -1,4 +1,4 @@ -tests/pp/empty3.cpp:2:6: error: [pp] Missing preprocessor directive (ignoring line): # +tests/pp/empty3.cpp:6:6: error: [pp] Missing preprocessor directive (ignoring line): # //@ # ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/pragma.err.oracle b/tests/pp/oracle/pragma.err.oracle index 41fa7d33..64e1f372 100644 --- a/tests/pp/oracle/pragma.err.oracle +++ b/tests/pp/oracle/pragma.err.oracle @@ -1,4 +1,4 @@ -tests/pp/pragma.cpp:5:6: error: [pp] Preprocessor directive is not permitted in ACSL++ annotation (ignoring line): # pragma asdasdasd +tests/pp/pragma.cpp:9:6: error: [pp] Preprocessor directive is not permitted in ACSL++ annotation (ignoring line): # pragma asdasdasd # pragma asdasdasd ^ code generation aborted due to one compilation error diff --git a/tests/pp/oracle/valid_function1.res.oracle b/tests/pp/oracle/valid_function1.res.oracle index 6f2147a6..3f0f101d 100644 --- a/tests/pp/oracle/valid_function1.res.oracle +++ b/tests/pp/oracle/valid_function1.res.oracle @@ -1,6 +1,6 @@ [kernel] Parsing tests/pp/valid_function1.cpp (external front-end) Now output intermediate result -[kernel:annot-error] tests/pp/valid_function1.cpp:7: Warning: +[kernel:annot-error] tests/pp/valid_function1.cpp:11: Warning: subscripted value is neither array nor pointer. Ignoring logic specification of function _Z1h [kernel] User Error: warning annot-error treated as fatal error. [kernel] User Error: stopping on file "tests/pp/valid_function1.cpp" that has errors. diff --git a/tests/pp/oracle/valid_function2.res.oracle b/tests/pp/oracle/valid_function2.res.oracle index 182aa86a..0528cf17 100644 --- a/tests/pp/oracle/valid_function2.res.oracle +++ b/tests/pp/oracle/valid_function2.res.oracle @@ -1,6 +1,6 @@ [kernel] Parsing tests/pp/valid_function2.cpp (external front-end) Now output intermediate result -[kernel:annot-error] tests/pp/valid_function2.cpp:7: Warning: +[kernel:annot-error] tests/pp/valid_function2.cpp:11: Warning: expecting a function pointer, found int *. Ignoring logic specification of function _Z2hh [kernel] User Error: warning annot-error treated as fatal error. [kernel] User Error: stopping on file "tests/pp/valid_function2.cpp" that has errors. diff --git a/tests/pp/pragma.cpp b/tests/pp/pragma.cpp index d3fc42bd..ebbd96d2 100644 --- a/tests/pp/pragma.cpp +++ b/tests/pp/pragma.cpp @@ -1,3 +1,7 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ // Tests whether pragma directive is properly reported /*@ diff --git a/tests/pp/valid_function1.cpp b/tests/pp/valid_function1.cpp index 8777f471..3ae13de9 100644 --- a/tests/pp/valid_function1.cpp +++ b/tests/pp/valid_function1.cpp @@ -1,3 +1,7 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ void f() {} diff --git a/tests/pp/valid_function2.cpp b/tests/pp/valid_function2.cpp index 60489cc1..326368e4 100644 --- a/tests/pp/valid_function2.cpp +++ b/tests/pp/valid_function2.cpp @@ -1,3 +1,7 @@ +/* run.config* +EXIT: 1 +STDOPT: +*/ void f() {} -- GitLab