mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-03 17:58:34 +00:00
UnitTests: Move some unit tests to where they should be
Two unit tests were in the root UnitTests folder and were not being built when using CMake.
This commit is contained in:
parent
ade9d6c954
commit
1f6bb06f2c
5 changed files with 9 additions and 2 deletions
|
@ -1,33 +0,0 @@
|
|||
// Copyright 2021 Dolphin Emulator Project
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "Core/PowerPC/JitCommon/DivUtils.h"
|
||||
|
||||
using namespace JitCommon;
|
||||
|
||||
TEST(DivUtils, Signed)
|
||||
{
|
||||
Magic m3 = SignedDivisionConstants(3);
|
||||
Magic m5 = SignedDivisionConstants(5);
|
||||
Magic m7 = SignedDivisionConstants(7);
|
||||
Magic minus3 = SignedDivisionConstants(-3);
|
||||
Magic minus5 = SignedDivisionConstants(-5);
|
||||
Magic minus7 = SignedDivisionConstants(-7);
|
||||
|
||||
EXPECT_EQ(0x55555556, m3.multiplier);
|
||||
EXPECT_EQ(0, m3.shift);
|
||||
EXPECT_EQ(0x66666667, m5.multiplier);
|
||||
EXPECT_EQ(1, m5.shift);
|
||||
EXPECT_EQ(-0x6DB6DB6D, m7.multiplier);
|
||||
EXPECT_EQ(2, m7.shift);
|
||||
|
||||
EXPECT_EQ(-0x55555556, minus3.multiplier);
|
||||
EXPECT_EQ(0, minus3.shift);
|
||||
EXPECT_EQ(-0x66666667, minus5.multiplier);
|
||||
EXPECT_EQ(1, minus5.shift);
|
||||
EXPECT_EQ(0x6DB6DB6D, minus7.multiplier);
|
||||
EXPECT_EQ(2, minus7.shift);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue