| 9326 | |
| 9327 | #define testBitfields(...) testBitfields_(__FILE__, __LINE__, __VA_ARGS__) |
| 9328 | void testBitfields_(const char *file, int line, const std::string &structBody, std::size_t expectedSize) { |
| 9329 | const Settings settingsUnix64 = settingsBuilder().platform(Platform::Type::Unix64).build(); |
| 9330 | const std::string code = "struct S { " + structBody + " }; const std::size_t size = sizeof(S);"; |
| 9331 | const auto values = tokenValues(code.c_str(), "( S", &settingsUnix64); |
| 9332 | ASSERT_LOC(!values.empty(), file, line); |
| 9333 | ASSERT_EQUALS_LOC(expectedSize, values.back().intvalue, file, line); |
| 9334 | } |
| 9335 | |
| 9336 | void bitfields() { |
| 9337 | |