mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
msvc: get UnitTests compiling
Choose it from VS or pass /p:RunUnitTests=true to msbuild
This commit is contained in:
@ -139,7 +139,8 @@ TEST(BitField, Alignment)
|
||||
|
||||
GC_ALIGNED16(OddlyAlignedTestStruct test_struct);
|
||||
TestUnion& object = test_struct.obj;
|
||||
static_assert(alignof(test_struct.obj.signed_1bit) == 1, "Incorrect variable alignment");
|
||||
static_assert(alignof(decltype(test_struct.obj.signed_1bit)) == 1,
|
||||
"Incorrect variable alignment");
|
||||
|
||||
for (u64 val : table)
|
||||
{
|
||||
|
@ -13,6 +13,9 @@ TEST(CommonFuncs, ArraySizeMacro)
|
||||
|
||||
EXPECT_EQ(4u, ArraySize(test));
|
||||
EXPECT_EQ(42u, ArraySize(test2));
|
||||
|
||||
(void)test;
|
||||
(void)test2;
|
||||
}
|
||||
|
||||
TEST(CommonFuncs, RoundUpPow2Macro)
|
||||
|
@ -37,7 +37,7 @@ TEST(Flag, MultiThreaded)
|
||||
int count = 0;
|
||||
const int ITERATIONS_COUNT = 100000;
|
||||
|
||||
auto setter = [&f]() {
|
||||
auto setter = [&]() {
|
||||
for (int i = 0; i < ITERATIONS_COUNT; ++i)
|
||||
{
|
||||
while (f.IsSet());
|
||||
@ -45,7 +45,7 @@ TEST(Flag, MultiThreaded)
|
||||
}
|
||||
};
|
||||
|
||||
auto clearer = [&f, &count]() {
|
||||
auto clearer = [&]() {
|
||||
for (int i = 0; i < ITERATIONS_COUNT; ++i)
|
||||
{
|
||||
while (!f.IsSet());
|
||||
|
Reference in New Issue
Block a user