aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/tdewolff/parse/css/hash_test.go
blob: e176cc19e56820ee0cf2be2f53cf72c5ce8fe8c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package css // import "github.com/tdewolff/parse/css"

import (
	"testing"

	"github.com/tdewolff/test"
)

func TestHashTable(t *testing.T) {
	test.T(t, ToHash([]byte("font")), Font, "'font' must resolve to hash.Font")
	test.T(t, Font.String(), "font")
	test.T(t, Margin_Left.String(), "margin-left")
	test.T(t, ToHash([]byte("")), Hash(0), "empty string must resolve to zero")
	test.T(t, Hash(0xffffff).String(), "")
	test.T(t, ToHash([]byte("fonts")), Hash(0), "'fonts' must resolve to zero")
}