14 lines
279 B
Go
14 lines
279 B
Go
package platepdf
|
||
|
||
import "testing"
|
||
|
||
func TestSVGViewportMM(t *testing.T) {
|
||
w, h, err := svgViewportMM([]byte(`<svg width="80mm" height="80mm" viewBox="0 0 1 1"></svg>`))
|
||
if err != nil {
|
||
t.Fatal(err)
|
||
}
|
||
if w != 80 || h != 80 {
|
||
t.Fatalf("got %v×%v want 80×80", w, h)
|
||
}
|
||
}
|