package domain

import "testing"

func TestHaversineDistanceZero(t *testing.T) {
	distance := HaversineDistance(-23.55, -46.63, -23.55, -46.63)
	if distance != 0 {
		t.Fatalf("expected zero distance, got %v", distance)
	}
}

func TestHaversineDistanceApproximate(t *testing.T) {
	distance := HaversineDistance(0, 0, 0, 1)
	if distance < 110 || distance > 112 {
		t.Fatalf("expected distance around 111km, got %v", distance)
	}
}
