mirror of
https://github.com/onyx-and-iris/aoc2023.git
synced 2024-11-22 10:20:48 +00:00
23 lines
439 B
Go
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)
|
|
})
|
|
}
|