Skip to content

Commit 91c5101

Browse files
committed
update rcheevos
1 parent 847583f commit 91c5101

3 files changed

Lines changed: 25 additions & 15 deletions

File tree

tests/devkit/context/impl/ConsoleContext_Tests.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ TEST_CLASS(ConsoleContext_Tests)
9898

9999
Assert::AreEqual(41, (int)context.Id());
100100
Assert::AreEqual(std::wstring(L"PlayStation Portable"), context.Name());
101-
Assert::AreEqual(0x01FFFFFFU, context.MaxAddress());
101+
Assert::AreEqual(0x03FFFFFFU, context.MaxAddress());
102102

103103
const auto& vRegions = context.MemoryRegions();
104-
Assert::AreEqual({2}, vRegions.size());
104+
Assert::AreEqual({3}, vRegions.size());
105105
Assert::AreEqual(0x00000000U, vRegions.at(0).GetStartAddress());
106106
Assert::AreEqual(0x007FFFFFU, vRegions.at(0).GetEndAddress());
107107
Assert::AreEqual(0x08000000U, vRegions.at(0).GetRealStartAddress());
@@ -112,12 +112,19 @@ TEST_CLASS(ConsoleContext_Tests)
112112
Assert::AreEqual(0x08800000U, vRegions.at(1).GetRealStartAddress());
113113
Assert::AreEqual(ra::data::MemoryRegion::Type::SystemRAM, vRegions.at(1).GetType());
114114
Assert::AreEqual(std::wstring(L"System RAM"), vRegions.at(1).GetDescription());
115+
Assert::AreEqual(0x02000000U, vRegions.at(2).GetStartAddress());
116+
Assert::AreEqual(0x03FFFFFFU, vRegions.at(2).GetEndAddress());
117+
Assert::AreEqual(0x0A000000U, vRegions.at(2).GetRealStartAddress());
118+
Assert::AreEqual(ra::data::MemoryRegion::Type::SystemRAM, vRegions.at(2).GetType());
119+
Assert::AreEqual(std::wstring(L"Extended RAM"), vRegions.at(2).GetDescription());
115120

116121
AssertRegion(context, 0x00000000U, &vRegions.at(0));
117122
AssertRegion(context, 0x007FFFFFU, &vRegions.at(0));
118123
AssertRegion(context, 0x00800000U, &vRegions.at(1));
119124
AssertRegion(context, 0x01FFFFFFU, &vRegions.at(1));
120-
AssertRegion(context, 0x02000000U, nullptr);
125+
AssertRegion(context, 0x02000000U, &vRegions.at(2));
126+
AssertRegion(context, 0x03FFFFFFU, &vRegions.at(2));
127+
AssertRegion(context, 0x04000000U, nullptr);
121128

122129
Assert::AreEqual(0x01123456U, context.ByteAddressFromRealAddress(0x09123456U));
123130
}

tests/ui/viewmodels/UnknownGameViewModel_Tests.cpp

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ TEST_CLASS(UnknownGameViewModel_Tests)
9393
Assert::IsFalse(vmUnknownGame.IsSelectedGameEnabled());
9494

9595
// trigger the response
96-
vmUnknownGame.mockRcClient.MockResponse("r=gameslist&c=30",
97-
"{\"Success\":true,\"Response\":{\"33\":\"Game 33\",\"37\":\"Game 37\"}}");
96+
vmUnknownGame.mockRcClient.MockResponse("r=systemgames&s=30",
97+
"{\"Success\":true,\"Response\":["
98+
"{\"ID\":33,\"Title\":\"Game 33\",\"NumAchievements\":0,\"NumLeaderboards\":0,\"Points\":0,\"ImageIcon\":\"/Images/001122.png\",\"ImageUrl\":\"http://host/Images/001122.png\",\"SupportedHashes\":[]},"
99+
"{\"ID\":37,\"Title\":\"Game 37\",\"NumAchievements\":8,\"NumLeaderboards\":0,\"Points\":40,\"ImageIcon\":\"/Images/001122.png\",\"ImageUrl\":\"http://host/Images/001122.png\",\"SupportedHashes\":[]}"
100+
"]}");
98101
vmUnknownGame.mockRcClient.AssertNoUnhandled();
99102

100103
// after server response, collection should have three items and be frozen. linking should be enabled
@@ -572,15 +575,15 @@ TEST_CLASS(UnknownGameViewModel_Tests)
572575
UnknownGameViewModelHarness vmUnknownGame;
573576
vmUnknownGame.mockConsoleContext.SetId(ConsoleID::C64);
574577

575-
vmUnknownGame.mockRcClient.MockResponse("r=gameslist&c=30",
576-
"{\"Success\":true,\"Response\":{"
577-
"\"6\":\"Another Game\","
578-
"\"2\":\"Game the First\","
579-
"\"1\":\"My First Game\","
580-
"\"3\":\"Not This Game\","
581-
"\"5\":\"Only That Game\","
582-
"\"4\":\"Play This\""
583-
"}}");
578+
vmUnknownGame.mockRcClient.MockResponse("r=systemgames&s=30",
579+
"{\"Success\":true,\"Response\":["
580+
"{\"ID\":6,\"Title\":\"Another Game\",\"NumAchievements\":8,\"NumLeaderboards\":0,\"Points\":40,\"ImageIcon\":\"/Images/001122.png\",\"ImageUrl\":\"http://host/Images/001122.png\",\"SupportedHashes\":[]},"
581+
"{\"ID\":2,\"Title\":\"Game the First\",\"NumAchievements\":0,\"NumLeaderboards\":0,\"Points\":0,\"ImageIcon\":\"/Images/001123.png\",\"ImageUrl\":\"http://host/Images/001123.png\",\"SupportedHashes\":[]},"
582+
"{\"ID\":1,\"Title\":\"My First Game\",\"NumAchievements\":12,\"NumLeaderboards\":4,\"Points\":100,\"ImageIcon\":\"/Images/001124.png\",\"ImageUrl\":\"http://host/Images/001124.png\",\"SupportedHashes\":[]},"
583+
"{\"ID\":3,\"Title\":\"Not This Game\",\"NumAchievements\":46,\"NumLeaderboards\":2,\"Points\":510,\"ImageIcon\":\"/Images/001125.png\",\"ImageUrl\":\"http://host/Images/001125.png\",\"SupportedHashes\":[]},"
584+
"{\"ID\":5,\"Title\":\"Only That Game\",\"NumAchievements\":27,\"NumLeaderboards\":0,\"Points\":243,\"ImageIcon\":\"/Images/001126.png\",\"ImageUrl\":\"http://host/Images/001126.png\",\"SupportedHashes\":[]},"
585+
"{\"ID\":4,\"Title\":\"Play This\",\"NumAchievements\":0,\"NumLeaderboards\":0,\"Points\":0,\"ImageIcon\":\"/Images/001127.png\",\"ImageUrl\":\"http://host/Images/001127.png\",\"SupportedHashes\":[]}"
586+
"]}");
584587

585588
vmUnknownGame.InitializeGameTitles();
586589
vmUnknownGame.SetSelectedGameId(4);

0 commit comments

Comments
 (0)