File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 <define name =" EXPECT_STRCASEEQ(str1,str2)" value =" (void)(*(str1)==*(str2))" />
2626 <define name =" ASSERT_STRCASENE(str1,str2)" value =" assert(stricmp(str1, str2) != 0)" />
2727 <define name =" EXPECT_STRCASENE(str1,str2)" value =" (void)(*(str1)!=*(str2))" />
28- <define name =" ASSERT_THROW(code, e)" value =" try{code}catch(e){}" />
29- <define name =" EXPECT_THROW(code, e)" value =" try{code}catch(e){}" />
28+ <define name =" ASSERT_THROW(code, e)" value =" try{code; }catch(e){}" />
29+ <define name =" EXPECT_THROW(code, e)" value =" try{code; }catch(e){}" />
3030 <define name =" TEST(A,B)" value =" void __ ## A ## _ ## B ( )" />
3131 <define name =" TEST_F(A,B)" value =" void __ ## A ## _ ## B ( )" />
3232 <define name =" TEST_P(A,B)" value =" void __ ## A ## _ ## B ( )" />
Original file line number Diff line number Diff line change @@ -36,3 +36,11 @@ TEST(ASSERT, ASSERT)
3636
3737 free (a);
3838}
39+
40+ // Avoid syntax error: https://sourceforge.net/p/cppcheck/discussion/general/thread/6ccc7283e2/
41+ TEST (test_cppcheck, cppcheck)
42+ {
43+ TestStruct<int > it;
44+ ASSERT_THROW (it.operator ->(), std::out_of_range);
45+ }
46+
You can’t perform that action at this time.
0 commit comments