Commit d8b1c190 authored by Miklos Magyari's avatar Miklos Magyari
Browse files

OOP: parsing of chained function calls


Signed-off-by: Miklos Magyari's avatarMiklos Magyari <miklos.magyari@sigmatechnology.se>
parent 1974e043
...@@ -52,12 +52,12 @@ error_marker_not_expected //this is not inserted ...@@ -52,12 +52,12 @@ error_marker_not_expected //this is not inserted
error_marker_not_expected //this is not inserted error_marker_not_expected //this is not inserted
error_marker_not_expected //this is not inserted error_marker_not_expected //this is not inserted
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
//not too big: //not too big:
#if 21474836488 #if 21474836488
{error_marker_expected;} {error_marker_expected!}
#endif #endif
//too big number: //too big number:
...@@ -66,14 +66,14 @@ error_marker_not_expected //this is not inserted ...@@ -66,14 +66,14 @@ error_marker_not_expected //this is not inserted
#endif #endif
#if 1 #if 1
{xxx;} //error expected, pass {xxx!} //error expected, pass
#else #else
xxx; //commented out xxx; //commented out
#endif #endif
//verdict:pass //verdict:pass
#if 100 #if 100
x1; //error expected, pass {error_marker_expected!} //error expected, pass
#elif -2 #elif -2
x2 x2
#else //commented out #else //commented out
...@@ -84,7 +84,7 @@ xxx ...@@ -84,7 +84,7 @@ xxx
#if 0 #if 0
x1; //commented out, error not expected x1; //commented out, error not expected
#elif -2 #elif -2
x2; //error expected {error_marker_expected!} //error expected
#else //commented out #else //commented out
xxx //commented out, error not expected xxx //commented out, error not expected
#endif #endif
...@@ -92,28 +92,28 @@ xxx //commented out, error not expected ...@@ -92,28 +92,28 @@ xxx //commented out, error not expected
#if 0 #if 0
x1; //error expected, fail {error_marker_expected!} //error expected, fail
#elif 0 #elif 0
x2; x2;
#else //commented out #else //commented out
{xxx;} //error expected, pass {xxx!} //error expected, pass
#endif #endif
//verdict:pass //verdict:pass
#if ((ONE+ONE)*THREE==6) #if ((ONE+ONE)*THREE==6)
{xxxx;} //error expected, fail {xxxx!} //error expected, fail
#else #else
xxx; //commented out xxx; //commented out
#endif #endif
//verdict:fail //verdict:fail
#if(THREE-TWO==ONE) #if(THREE-TWO==ONE)
{xxxy;} //error expected {xxxy!} //error expected
#endif #endif
//verict: fail //verict: fail
#if(THREE>TWO) #if(THREE>TWO)
{xxxz;} //error expected {xxxz!} //error expected
#endif #endif
}//tc_macro1 }//tc_macro1
...@@ -146,7 +146,7 @@ function f_include_test() runs on My_CT { ...@@ -146,7 +146,7 @@ function f_include_test() runs on My_CT {
if(vl_i==124){setverdict(pass);} else {setverdict(fail)} if(vl_i==124){setverdict(pass);} else {setverdict(fail)}
#if defined VL_I #if defined VL_I
{error_expected;} {error_marker_expected!}
#else #else
error_notexpected; error_notexpected;
#endif #endif
...@@ -170,13 +170,13 @@ testcase tc_if_and_macro_expr() runs on My_CT { ...@@ -170,13 +170,13 @@ testcase tc_if_and_macro_expr() runs on My_CT {
#if 0 #if 0
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#if 0 #if 0
error_marker_not_expected error_marker_not_expected
#elif -3 #elif -3
{error_marker_expected;} {error_marker_expected!}
#else //commented out #else //commented out
error_marker_not_expected error_marker_not_expected
#endif #endif
...@@ -189,37 +189,37 @@ testcase tc_if_and_macro_expr() runs on My_CT { ...@@ -189,37 +189,37 @@ testcase tc_if_and_macro_expr() runs on My_CT {
#elif ZERO #elif ZERO
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
//verdict:pass //verdict:pass
//#if true constructs //#if true constructs
#if 1 #if 1
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#if 2147483647 #if 2147483647
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#if -2147483647 #if -2147483647
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#if -1 #if -1
{error_marker_expected;} {error_marker_expected!}
#endif #endif
//verdict:pass //verdict:pass
#if 1 #if 1
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
//verdict:pass //verdict:pass
#if 100 #if 100
{error_marker_expected;} {error_marker_expected!}
#elif -2 #elif -2
error_marker_not_expected error_marker_not_expected
#else //commented out #else //commented out
...@@ -228,7 +228,7 @@ testcase tc_if_and_macro_expr() runs on My_CT { ...@@ -228,7 +228,7 @@ testcase tc_if_and_macro_expr() runs on My_CT {
//verdict:pass //verdict:pass
#if 100 #if 100
{error_marker_expected;} {error_marker_expected!}
#elif 0 #elif 0
error_marker_not_expected error_marker_not_expected
#else //commented out #else //commented out
...@@ -237,55 +237,55 @@ testcase tc_if_and_macro_expr() runs on My_CT { ...@@ -237,55 +237,55 @@ testcase tc_if_and_macro_expr() runs on My_CT {
//verdict:pass //verdict:pass
#if ((ONE+ONE)*THREE==6) #if ((ONE+ONE)*THREE==6)
{error_marker_expected;} {error_marker_expected!}
#endif #endif
//verdict:pass //verdict:pass
#if ((ONE+ONE)*THREE==6) #if ((ONE+ONE)*THREE==6)
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
//verdict:pass //verdict:pass
#if (ONE+TWO*THREE==7) #if (ONE+TWO*THREE==7)
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
//verdict:pass //verdict:pass
#if(THREE-TWO==ONE) #if(THREE-TWO==ONE)
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
//verict: fail //verict: fail
#if(THREE>TWO) #if(THREE>TWO)
{error_marker_expected;} {error_marker_expected!}
#endif #endif
}//tc_if }//tc_if
testcase tc_define_ifdef() runs on My_CT { testcase tc_define_ifdef() runs on My_CT {
//************** define and ifdef************************************/ //************** define and ifdef************************************/
{error_marker_expected;} //wrong highlighting, if */ removed from the prev line {error_marker_expected!} //wrong highlighting, if */ removed from the prev line
#define MYMACRO1 #define MYMACRO1
#ifdef MYMACRO1 #ifdef MYMACRO1
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#ifdef MYMACRO1 #ifdef MYMACRO1
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
#ifdef MYMACRO1 #ifdef MYMACRO1
{error_marker_expected;} {error_marker_expected!}
#elif 12 #elif 12
error_marker_not_expected error_marker_not_expected
#else #else
...@@ -293,20 +293,20 @@ testcase tc_define_ifdef() runs on My_CT { ...@@ -293,20 +293,20 @@ testcase tc_define_ifdef() runs on My_CT {
#endif #endif
#ifdef MYMACRO1 #ifdef MYMACRO1
{error_marker_expected;} {error_marker_expected!}
#define MYMACRO2 #define MYMACRO2
#ifdef MYMACRO2 #ifdef MYMACRO2
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
{error_marker_expected;} {error_marker_expected!}
#else #else
setverdict(false); setverdict(false);
#endif #endif
#ifdef MYMACRO #ifdef MYMACRO
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#undef MYMACRO1 #undef MYMACRO1
...@@ -317,13 +317,13 @@ testcase tc_define_ifdef() runs on My_CT { ...@@ -317,13 +317,13 @@ testcase tc_define_ifdef() runs on My_CT {
#ifdef MYMACRO1 #ifdef MYMACRO1
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#ifdef MYMACRO1 #ifdef MYMACRO1
error_marker_not_expected error_marker_not_expected
#elif 12 #elif 12
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
...@@ -343,13 +343,13 @@ testcase tc_define_ifndef() runs on My_CT { ...@@ -343,13 +343,13 @@ testcase tc_define_ifndef() runs on My_CT {
#ifndef MYMACRO1 #ifndef MYMACRO1
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#ifndef MYMACRO1 #ifndef MYMACRO1
error_marker_not_expected error_marker_not_expected
#elif 12 #elif 12
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
...@@ -362,14 +362,14 @@ testcase tc_define_ifndef() runs on My_CT { ...@@ -362,14 +362,14 @@ testcase tc_define_ifndef() runs on My_CT {
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
{error_marker_expected;} {error_marker_expected!}
#else #else
{error_marker_expected;} {error_marker_expected!}
#define MYMACRO2 #define MYMACRO2
#ifndef MYMACRO2 #ifndef MYMACRO2
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#endif #endif
} }
...@@ -380,17 +380,17 @@ testcase tc_undef_ifndef() runs on My_CT { ...@@ -380,17 +380,17 @@ testcase tc_undef_ifndef() runs on My_CT {
#undef MYMACRO1 #undef MYMACRO1
#ifndef MYMACRO1 #ifndef MYMACRO1
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#ifndef MYMACRO1 #ifndef MYMACRO1
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
#ifndef MYMACRO1 #ifndef MYMACRO1
{error_marker_expected;} {error_marker_expected!}
#elif 12 #elif 12
error_marker_not_expected error_marker_not_expected
#else #else
...@@ -409,13 +409,13 @@ testcase tc_undef_ifdef() runs on My_CT { ...@@ -409,13 +409,13 @@ testcase tc_undef_ifdef() runs on My_CT {
#ifdef MYMACRO1 #ifdef MYMACRO1
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#ifdef MYMACRO1 #ifdef MYMACRO1
error_marker_not_expected error_marker_not_expected
#elif 12 #elif 12
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
...@@ -424,11 +424,11 @@ testcase tc_undef_ifdef() runs on My_CT { ...@@ -424,11 +424,11 @@ testcase tc_undef_ifdef() runs on My_CT {
testcase tc_embedded_ifs() runs on My_CT { testcase tc_embedded_ifs() runs on My_CT {
#if 1 && -1 #if 1 && -1
{error_marker_expected;} {error_marker_expected!}
#if 0 #if 0
setvedict(fail) setvedict(fail)
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#else #else
error_marker_not_expected error_marker_not_expected
...@@ -447,11 +447,11 @@ testcase tc_embedded_ifs() runs on My_CT { ...@@ -447,11 +447,11 @@ testcase tc_embedded_ifs() runs on My_CT {
error_marker_not_expected error_marker_not_expected
#endif #endif
#else #else
{error_marker_expected;} {error_marker_expected!}
#if 0 #if 0
setvedict(fail) setvedict(fail)
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#endif #endif
} }
...@@ -464,13 +464,13 @@ testcase tc_cascade() runs on My_CT { ...@@ -464,13 +464,13 @@ testcase tc_cascade() runs on My_CT {
#define TWENTY5 TWENTY4 #define TWENTY5 TWENTY4
#if TWENTY2 == 20 #if TWENTY2 == 20
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
#if TWENTY5 == 20 #if TWENTY5 == 20
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
...@@ -478,7 +478,7 @@ testcase tc_cascade() runs on My_CT { ...@@ -478,7 +478,7 @@ testcase tc_cascade() runs on My_CT {
#if TWENTY5 != 20 #if TWENTY5 != 20
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
} }
...@@ -488,12 +488,12 @@ testcase tc_three_operands() runs on My_CT { ...@@ -488,12 +488,12 @@ testcase tc_three_operands() runs on My_CT {
#if AAA ? 0 : 1 #if AAA ? 0 : 1
error_marker_not_expected error_marker_not_expected
#else #else
{error_marker_expected;} {error_marker_expected!}
#endif #endif
#define AAA 1 #define AAA 1
#if AAA ? 1 : 0 #if AAA ? 1 : 0
{error_marker_expected;} {error_marker_expected!}
#else #else
error_marker_not_expected error_marker_not_expected
#endif #endif
...@@ -502,12 +502,12 @@ testcase tc_three_operands() runs on My_CT { ...@@ -502,12 +502,12 @@ testcase tc_three_operands() runs on My_CT {
#if AAA ? 1 : 0