package service

import "testing"

func TestRoomListSortScoreUsesCompressedWeightedInputs(t *testing.T) {
	score := roomListSortScore(7, 3, 2)
	if score != 2650000 {
		t.Fatalf("hot score should use 65/30/5 weighted compressed inputs, got %d", score)
	}
}

func TestRoomListSortScoreCapsPresenceInputs(t *testing.T) {
	capped := roomListSortScore(0, 50, 10)
	overCap := roomListSortScore(0, 999, 999)
	if capped != overCap {
		t.Fatalf("hot score should cap online and occupied seats, capped=%d over_cap=%d", capped, overCap)
	}
}
