Files
DarkflameServer/tests/dGameTests/dComponentsTests/PropertyEntranceComponentTests.cpp
Aaron Kimbrell c5a649bf8b fix(property): the property browser reply says wasFriends only for the friends list
LWOPropertyEntranceComponent::msgPropertySelectQuery hands wasFriends to the browser UI.
Live sent 1 on all 27 replies to a sort 5 query and 0 on all 8 replies to sort 1 and sort 3; it was always 1 here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 20:36:57 -06:00

16 lines
717 B
C++

#include "GameDependencies.h"
#include "PropertyEntranceComponent.h"
#include "ePropertySortType.h"
#include <gtest/gtest.h>
// The property browser's reply says whether the list it answers was the friends list. Live sent wasFriends 1 on every
// reply to a sort 5 query and 0 on the replies to sort 1 (reputation) and sort 3 (recent).
TEST(PropertyEntranceComponentTests, WasFriendsFollowsTheSortMethod) {
EXPECT_TRUE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_FEATURED));
EXPECT_TRUE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_FRIENDS));
EXPECT_FALSE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_REPUTATION));
EXPECT_FALSE(PropertyEntranceComponent::IsFriendsSort(SORT_TYPE_RECENT));
}