1
0
mirror of https://github.com/nikolaydubina/calendarheatmap.git synced 2025-02-08 03:41:02 +02:00
This commit is contained in:
Nikolay 2020-07-11 19:01:50 +08:00
parent 0a6fbbf43e
commit 69afd7e253

View File

@ -1,10 +1,28 @@
package parsers
import (
"fmt"
"reflect"
"testing"
)
func ExampleBasicJSONParser() {
parser := BasicJSONParser{}
year, countByDay, err := parser.Parse([]byte(`
"2020-01-02": 7,
"2020-02-05": 2,
"2020-02-04": 3
}`))
fmt.Print(year)
fmt.Print(countByDay)
fmt.Print(err)
// expectedCountByDay := map[int]int{
// 2: 7,
// 36: 2,
// 35: 3,
// }
}
func Test_BasicJSONParser_Basic(t *testing.T) {
t.Run("empty map", func(t *testing.T) {