Skip to content

Commit f55863a

Browse files
committed
Adding test.
1 parent 515affa commit f55863a

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

tests/pcsxrunner/timers.cc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/***************************************************************************
2+
* Copyright (C) 2026 PCSX-Redux authors *
3+
* *
4+
* This program is free software; you can redistribute it and/or modify *
5+
* it under the terms of the GNU General Public License as published by *
6+
* the Free Software Foundation; either version 2 of the License, or *
7+
* (at your option) any later version. *
8+
* *
9+
* This program is distributed in the hope that it will be useful, *
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12+
* GNU General Public License for more details. *
13+
* *
14+
* You should have received a copy of the GNU General Public License *
15+
* along with this program; if not, write to the *
16+
* Free Software Foundation, Inc., *
17+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
18+
***************************************************************************/
19+
20+
#include "gtest/gtest.h"
21+
#include "main/main.h"
22+
23+
TEST(Timers, Interpreter) {
24+
MainInvoker invoker("-no-ui", "-run", "-bios", "src/mips/openbios/openbios.bin", "-testmode", "-interpreter",
25+
"-luacov", "-loadexe", "src/mips/tests/timers/timers.ps-exe");
26+
int ret = invoker.invoke();
27+
EXPECT_EQ(ret, 0);
28+
}
29+
30+
TEST(Timers, Dynarec) {
31+
MainInvoker invoker("-no-ui", "-run", "-bios", "src/mips/openbios/openbios.bin", "-testmode", "-dynarec",
32+
"-luacov", "-loadexe", "src/mips/tests/timers/timers.ps-exe");
33+
int ret = invoker.invoke();
34+
EXPECT_EQ(ret, 0);
35+
}

0 commit comments

Comments
 (0)