aboutsummaryrefslogtreecommitdiff
path: root/gemini_test.go
blob: 59fe3c87678e60ec425a68323c9e8742d8a0cf6b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package gemini

import "testing"

func TestSimplifyStatus(t *testing.T) {
	tests := []struct {
		ComplexStatus int
		SimpleStatus  int
	}{
		{10, 10},
		{20, 20},
		{21, 20},
		{44, 40},
		{59, 50},
	}

	for _, tt := range tests {
		result := SimplifyStatus(tt.ComplexStatus)
		if result != tt.SimpleStatus {
			t.Errorf("Expected the simplified status of %d to be %d, got %d instead", tt.ComplexStatus, tt.SimpleStatus, result)
		}
	}
}