diff --git a/SConstruct b/SConstruct index 084d4f3684..a1c86b97b0 100644 --- a/SConstruct +++ b/SConstruct @@ -81,6 +81,7 @@ dirs = [ 'Source/Plugins/Plugin_Wiimote/Src', 'Source/Core/DolphinWX/Src', 'Source/Core/DebuggerWX/Src', + 'Source/UnitTests/', ] builders = {} diff --git a/Source/Core/DSPCore/Src/DSPTables.cpp b/Source/Core/DSPCore/Src/DSPTables.cpp index 6b5a0e2bf0..99fc7d59c0 100644 --- a/Source/Core/DSPCore/Src/DSPTables.cpp +++ b/Source/Core/DSPCore/Src/DSPTables.cpp @@ -169,7 +169,7 @@ const DSPOPCTemplate opcodes[] = {"CMPIS", 0x0600, 0xfe00, DSPInterpreter::cmpis, NULL, 1, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_IMM, 1, 0, 0, 0x00ff}}, false, false}, {"LRIS", 0x0800, 0xf800, DSPInterpreter::lris, NULL, 1, 2, {{P_REG18, 1, 0, 8, 0x0700}, {P_IMM, 1, 0, 0, 0x00ff}}, false, false}, - {"ADDI", 0x0200, 0xfeff, DSPInterpreter::addi, NULL, 2, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_IMM, 2, 1, 0, 0xffff}}, false, false}, // F|RES: missing S64 + {"ADDI", 0x0200, 0xfeff, DSPInterpreter::addi, NULL, 2, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_IMM, 2, 1, 0, 0xffff}}, false, false}, {"XORI", 0x0220, 0xfeff, DSPInterpreter::xori, NULL, 2, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_IMM, 2, 1, 0, 0xffff}}, false, false}, {"ANDI", 0x0240, 0xfeff, DSPInterpreter::andi, NULL, 2, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_IMM, 2, 1, 0, 0xffff}}, false, false}, {"ORI", 0x0260, 0xfeff, DSPInterpreter::ori, NULL, 2, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_IMM, 2, 1, 0, 0xffff}}, false, false}, @@ -179,7 +179,7 @@ const DSPOPCTemplate opcodes[] = {"ANDCF", 0x02c0, 0xfeff, DSPInterpreter::andcf, NULL, 2, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_IMM, 2, 1, 0, 0xffff}}, false, false}, {"ILRR", 0x0210, 0xfefc, DSPInterpreter::ilrr, NULL, 1, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_PRG, 1, 0, 0, 0x0003}}, false, false}, - {"ILRRD", 0x0214, 0xfefc, DSPInterpreter::ilrrd, NULL, 1, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_PRG, 1, 0, 0, 0x0003}}, false, false}, // Hermes doesn't list this + {"ILRRD", 0x0214, 0xfefc, DSPInterpreter::ilrrd, NULL, 1, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_PRG, 1, 0, 0, 0x0003}}, false, false}, {"ILRRI", 0x0218, 0xfefc, DSPInterpreter::ilrri, NULL, 1, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_PRG, 1, 0, 0, 0x0003}}, false, false}, {"ILRRN", 0x021c, 0xfefc, DSPInterpreter::ilrrn, NULL, 1, 2, {{P_ACCM, 1, 0, 8, 0x0100}, {P_PRG, 1, 0, 0, 0x0003}}, false, false}, diff --git a/Source/UnitTests/AudioJitTests.cpp b/Source/UnitTests/AudioJitTests.cpp index 295ec0e815..ec4a21c4af 100644 --- a/Source/UnitTests/AudioJitTests.cpp +++ b/Source/UnitTests/AudioJitTests.cpp @@ -83,4 +83,4 @@ unsigned int DSPHost_CodeLoaded(unsigned const char*, int) { return 0; } void DSPHost_InterruptRequest() { } bool DSPHost_OnThread() { return false; } void DSPHost_WriteHostMemory(unsigned char, unsigned int) { } -unsigned char DSPHost_ReadHostMemory(unsigned int) { return 0; } \ No newline at end of file +unsigned char DSPHost_ReadHostMemory(unsigned int) { return 0; } diff --git a/Source/UnitTests/UnitTests.cpp b/Source/UnitTests/UnitTests.cpp index 27eb352ea5..54f5e67555 100644 --- a/Source/UnitTests/UnitTests.cpp +++ b/Source/UnitTests/UnitTests.cpp @@ -26,26 +26,25 @@ void AudioJitTests(); using namespace std; - int fail_count = 0; #define EXPECT_TRUE(a) \ if (!a) { \ - cout << "FAIL (" __FUNCTION__ "): " << #a << " is false" << endl; \ + cout << "FAIL (" << __FUNCTION__ << "): " << #a << " is false" << endl; \ cout << "Value: " << a << endl << "Expected: true" << endl; \ fail_count++; \ } #define EXPECT_FALSE(a) \ if (a) { \ - cout << "FAIL (" __FUNCTION__ "): " << #a << " is true" << endl; \ + cout << "FAIL (" << __FUNCTION__ << "): " << #a << " is true" << endl; \ cout << "Value: " << a << endl << "Expected: false" << endl; \ fail_count++; \ } #define EXPECT_EQ(a, b) \ if ((a) != (b)) { \ - cout << "FAIL (" __FUNCTION__ "): " << #a << " is not equal to " << #b << endl; \ + cout << "FAIL (" << __FUNCTION__ << "): " << #a << " is not equal to " << #b << endl; \ cout << "Actual: " << a << endl << "Expected: " << b << endl; \ fail_count++; \ } @@ -101,7 +100,11 @@ void StringTests() EXPECT_EQ(TabsToSpaces(4, "a\tb"), "a b"); } +#ifdef _WIN32 int main(int argc, _TCHAR* argv[]) +#else +int main(int argc, char* argv[]) +#endif { AudioJitTests();