mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
WTF-389 Don't load widgets that have invalid position co-ordinates in their config
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
package wtf_tests
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
func TestPosition(t *testing.T) {
|
||||
pos := NewPosition(0, 1, 2, 3)
|
||||
|
||||
if pos.Top() != 0 {
|
||||
t.Fatalf("Expected 0 but got %d", pos.Top())
|
||||
}
|
||||
|
||||
if pos.Left() != 1 {
|
||||
t.Fatalf("Expected 1 but got %d", pos.Left())
|
||||
}
|
||||
|
||||
if pos.Width() != 2 {
|
||||
t.Fatalf("Expected 2 but got %d", pos.Width())
|
||||
}
|
||||
|
||||
if pos.Height() != 3 {
|
||||
t.Fatalf("Expected 3 but got %d", pos.Height())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user