@@ -3172,4 +3172,33 @@ namespace {
3172
3172
})
3173
3173
);
3174
3174
}
3175
+
3176
+ TEST_F (Syntax_Test, bitfields_check_unnamed) {
3177
+ auto [testGen, status] = createTestForFunction (bitfields_c, 99 );
3178
+
3179
+ ASSERT_TRUE (status.ok ()) << status.error_message ();
3180
+
3181
+ checkTestCasePredicates (
3182
+ testGen.tests .at (bitfields_c).methods .begin ().value ().testCases ,
3183
+ std::vector<TestCasePredicate>(
3184
+ {
3185
+ [](const tests::Tests::MethodTestCase &testCase) {
3186
+ auto &subViews = testCase.paramValues .front ().view ->getSubViews ();
3187
+ return subViews.size () == 3 &&
3188
+ checkBitfieldFit<unsigned >(subViews[0 ], 7 ) &&
3189
+ checkBitfieldFit<unsigned >(subViews[1 ], 6 ) &&
3190
+ checkBitfieldFit<unsigned >(subViews[2 ], 15 ) &&
3191
+ testCase.returnValue .view ->getEntryValue (nullptr ) == " 0" ;
3192
+ },
3193
+ [](const tests::Tests::MethodTestCase &testCase) {
3194
+ auto &subViews = testCase.paramValues .front ().view ->getSubViews ();
3195
+ return subViews.size () == 3 &&
3196
+ checkBitfieldFit<unsigned >(subViews[0 ], 7 ) &&
3197
+ checkBitfieldFit<unsigned >(subViews[1 ], 6 ) &&
3198
+ checkBitfieldFit<unsigned >(subViews[2 ], 15 ) &&
3199
+ testCase.returnValue .view ->getEntryValue (nullptr ) == " 13" ;
3200
+ }
3201
+ })
3202
+ );
3203
+ }
3175
3204
}
0 commit comments