Skip to content

Commit 62de5bd

Browse files
committed
update existing tests
1 parent fcb330f commit 62de5bd

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

test/testtokenize.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4724,7 +4724,7 @@ class TestTokenizer : public TestFixture {
47244724
ASSERT_EQUALS("struct RGB { unsigned int r ; unsigned int g ; unsigned int b ; } ;", tokenizeAndStringify(code1));
47254725

47264726
const char code2[] = "struct A { int a : 3; int : 3; int c : 3; };";
4727-
ASSERT_EQUALS("struct A { int a ; int c ; } ;", tokenizeAndStringify(code2));
4727+
ASSERT_EQUALS("struct A { int a ; int __cppcheck_anon_bit_field_0__ ; int c ; } ;", tokenizeAndStringify(code2));
47284728

47294729
const char code3[] = "struct A { virtual void f() {} int f1 : 1; };";
47304730
ASSERT_EQUALS("struct A { virtual void f ( ) { } int f1 ; } ;", tokenizeAndStringify(code3));
@@ -4738,7 +4738,7 @@ class TestTokenizer : public TestFixture {
47384738
ASSERT_EQUALS("struct A { bool b ; bool c ; } ;", tokenizeAndStringify(code2));
47394739

47404740
const char code3[] = "struct A { bool : true; };";
4741-
ASSERT_EQUALS("struct A { } ;", tokenizeAndStringify(code3));
4741+
ASSERT_EQUALS("struct A { bool __cppcheck_anon_bit_field_0__ ; } ;", tokenizeAndStringify(code3));
47424742
}
47434743

47444744
void bitfields7() { // ticket #1987
@@ -4789,7 +4789,7 @@ class TestTokenizer : public TestFixture {
47894789

47904790
void bitfields12() { // ticket #3485 (segmentation fault)
47914791
const char code[] = "{a:1;};\n";
4792-
ASSERT_EQUALS("{ } ;", tokenizeAndStringify(code));
4792+
ASSERT_EQUALS("{ a __cppcheck_anon_bit_field_0__ ; } ;", tokenizeAndStringify(code));
47934793
}
47944794

47954795
void bitfields13() { // ticket #3502 (segmentation fault)
@@ -4829,9 +4829,9 @@ class TestTokenizer : public TestFixture {
48294829
"};\n";
48304830
const char expected[] = "struct S {\n"
48314831
"volatile uint32_t a ;\n"
4832-
"\n"
4832+
"volatile uint32_t __cppcheck_anon_bit_field_0__ ;\n"
48334833
"volatile uint32_t b ;\n"
4834-
"\n"
4834+
"volatile uint32_t __cppcheck_anon_bit_field_1__ ;\n"
48354835
"} ;";
48364836
ASSERT_EQUALS(expected, tokenizeAndStringify(code));
48374837

@@ -4841,7 +4841,7 @@ class TestTokenizer : public TestFixture {
48414841
"};\n";
48424842
const char expected2[] = "struct S {\n"
48434843
"const volatile uint32_t a ;\n"
4844-
"\n"
4844+
"const volatile uint32_t __cppcheck_anon_bit_field_0__ ;\n"
48454845
"} ;";
48464846
ASSERT_EQUALS(expected2, tokenizeAndStringify(code2));
48474847
}

0 commit comments

Comments
 (0)