Browse Source

Test for display modes.

Beoran 6 years ago
parent
commit
4dba3012bb
1 changed files with 13 additions and 3 deletions
  1. 13 3
      al/al_test.go

+ 13 - 3
al/al_test.go

@@ -89,9 +89,9 @@ func TestGetTimeRest(t *testing.T) {
     InstallSystem()
     defer UninstallSystem()
     rest := 0.123
-    t1 := GetTime()
+    t1 := Time()
     Rest(rest)
-    t2 := GetTime()
+    t2 := Time()
     del := t2 - t1 - rest
     if (del > 0.001) || (del < -0.001) {
         t.Errorf("Rest/GetTime for %f not precise %f %f %f", rest, t1, t2, del)
@@ -190,7 +190,7 @@ func makeDisplay() *Display {
     display := CreateDisplay(SCREEN_W, SCREEN_H)
     display.Resize(SCREEN_W, SCREEN_H)
     if !(*fullscreen) {
-        display.SetTitle("Algo test window")
+        display.SetWindowTitle("Algo test window")
     }
     return display
 }
@@ -231,6 +231,16 @@ func TestBasicDisplay(t *testing.T) {
     Rest(1.0)
 }
 
+// Test full screen display modes functions 
+func TestDisplayMode(t *testing.T) {
+    InstallSystem()
+    defer UninstallSystem()
+    modes := DisplayModes()
+    for _, m := range modes {
+        t.Logf("Display mode: %\ns", m.String());
+    }
+}
+
 // Test some font functions 
 func TestFonts(t *testing.T) {
     InstallSystem()