aoc2023/day-7/util_test.go
2023-12-07 23:13:05 +00:00

23 lines
439 B
Go

package main
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestMatches(t *testing.T) {
//t.Skip("skipping test")
m1 := matches("32T3K")
m2 := matches("JJU8J")
t.Run("Should produce equal maps", func(t *testing.T) {
assert.Equal(t, map[rune]int{'3': 2, '2': 1, 'T': 1, 'K': 1}, m1)
})
t.Run("Should produce equal maps", func(t *testing.T) {
assert.Equal(t, map[rune]int{'J': 3, 'U': 1, '8': 1}, m2)
})
}