Skip to content

Commit 6269293

Browse files
authored
examples: test GetMapMetadata (#350)
1 parent c691036 commit 6269293

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

examples/common_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package examples_test
2+
3+
import (
4+
"testing"
5+
6+
"github.com/golang/geo/r2"
7+
"github.com/markus-wa/demoinfocs-golang/v2/examples"
8+
"github.com/markus-wa/demoinfocs-golang/v2/pkg/demoinfocs/metadata"
9+
"github.com/stretchr/testify/assert"
10+
)
11+
12+
func TestGetMapMetadata(t *testing.T) {
13+
meta := examples.GetMapMetadata("de_cache", 1901448379)
14+
15+
assert.Equal(t, metadata.Map{
16+
Name: "de_cache",
17+
PZero: r2.Point{
18+
X: -2000,
19+
Y: 3250,
20+
},
21+
Scale: 5.5,
22+
}, meta)
23+
}

0 commit comments

Comments
 (0)