aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/animation-test.scm2
-rw-r--r--tests/assets-test.scm2
-rw-r--r--tests/engine-test.scm34
-rw-r--r--tests/entity-test.scm2
-rw-r--r--tests/input-test.scm4
-rw-r--r--tests/physics-test.scm12
-rw-r--r--tests/prefabs-test.scm10
-rw-r--r--tests/renderer-test.scm10
-rw-r--r--tests/scene-loader-test.scm26
-rw-r--r--tests/tilemap-test.scm2
-rw-r--r--tests/tween-test.scm2
-rw-r--r--tests/world-test.scm8
12 files changed, 57 insertions, 57 deletions
diff --git a/tests/animation-test.scm b/tests/animation-test.scm
index adf534f..117e933 100644
--- a/tests/animation-test.scm
+++ b/tests/animation-test.scm
@@ -4,7 +4,7 @@
(include "tilemap.scm")
(include "world.scm")
(include "animation.scm")
-(import downstroke-entity downstroke-world downstroke-animation)
+(import (downstroke entity) (downstroke world) (downstroke animation))
;; Test helpers: construct alist entities / animation defs from readable plist kwargs.
(define (entity . kws) (plist->alist kws))
diff --git a/tests/assets-test.scm b/tests/assets-test.scm
index 348cea0..5fea845 100644
--- a/tests/assets-test.scm
+++ b/tests/assets-test.scm
@@ -1,7 +1,7 @@
(import test)
(include "assets.scm")
-(import downstroke-assets)
+(import (downstroke assets))
(test-begin "assets")
diff --git a/tests/engine-test.scm b/tests/engine-test.scm
index ddeb308..bfa6d75 100644
--- a/tests/engine-test.scm
+++ b/tests/engine-test.scm
@@ -41,7 +41,7 @@
(import (prefix sdl2-image "img:"))
;; --- Entity module (mock minimal structs) ---
-(module downstroke-entity *
+(module (downstroke entity) *
(import scheme (chicken base))
(define (entity-ref entity key #!optional (default #f))
(let loop ((plist entity))
@@ -49,10 +49,10 @@
((null? plist) (if (procedure? default) (default) default))
((eq? (car plist) key) (cadr plist))
(else (loop (cddr plist)))))))
-(import downstroke-entity)
+(import (downstroke entity))
;; --- Input module (mock) ---
-(module downstroke-input *
+(module (downstroke input) *
(import scheme (chicken base) defstruct)
(defstruct input-config
actions keyboard-map joy-button-map controller-button-map
@@ -78,12 +78,12 @@
state)
(define (input-held? state action)
#f))
-(import downstroke-input)
+(import (downstroke input))
;; --- World module (mock) ---
-(module downstroke-world *
+(module (downstroke world) *
(import scheme (chicken base) defstruct)
- (import downstroke-entity)
+ (import (downstroke entity))
(defstruct camera x y)
(defstruct scene entities tilemap tileset camera tileset-texture camera-target background engine-update)
;; Mock camera-follow - returns a new camera
@@ -106,15 +106,15 @@
(define (scene-transform-entities scene proc)
(update-scene scene entities: (proc (scene-entities scene))))
(define (sync-groups entities) entities))
-(import downstroke-world)
+(import (downstroke world))
;; --- Real deps ---
(import simple-logger) ;; required by input.scm
(include "assets.scm")
-(import downstroke-assets)
+(import (downstroke assets))
;; --- Physics module (mock) ---
-(module downstroke-physics *
+(module (downstroke physics) *
(import scheme (chicken base))
(define (apply-acceleration e s d) e)
(define (apply-gravity e s d) e)
@@ -124,30 +124,30 @@
(define (resolve-tile-collisions-y e s d) e)
(define (detect-on-solid e s d) e)
(define (resolve-entity-collisions es) es))
-(import downstroke-physics)
+(import (downstroke physics))
;; --- Tween module (mock) ---
-(module downstroke-tween *
+(module (downstroke tween) *
(import scheme (chicken base))
(define (step-tweens e s d) e))
-(import downstroke-tween)
+(import (downstroke tween))
;; --- Renderer module (mock) ---
-(module downstroke-renderer *
+(module (downstroke renderer) *
(import scheme (chicken base))
(define (render-scene! . args) #f)
(define (render-debug-scene! . args) #f))
-(import downstroke-renderer)
+(import (downstroke renderer))
;; --- Animation module (mock) ---
-(module downstroke-animation *
+(module (downstroke animation) *
(import scheme (chicken base))
(define (apply-animation e s d) e))
-(import downstroke-animation)
+(import (downstroke animation))
;; --- Engine module (real) ---
(include "engine.scm")
-(import downstroke-engine)
+(import (downstroke engine))
;; --- Tests ---
diff --git a/tests/entity-test.scm b/tests/entity-test.scm
index d56e115..1e3ab19 100644
--- a/tests/entity-test.scm
+++ b/tests/entity-test.scm
@@ -1,6 +1,6 @@
(import test)
(include "entity.scm")
-(import downstroke-entity)
+(import (downstroke entity))
(test-begin "entity")
diff --git a/tests/input-test.scm b/tests/input-test.scm
index 50395d8..2903cbb 100644
--- a/tests/input-test.scm
+++ b/tests/input-test.scm
@@ -12,7 +12,7 @@
;; Load entity first (input imports it)
(include "entity.scm")
-(import downstroke-entity)
+(import (downstroke entity))
(import (only (list-utils alist) plist->alist))
@@ -22,7 +22,7 @@
;; Load the module source directly
(include "input.scm")
;; Now import it to access the exported functions
-(import downstroke-input)
+(import (downstroke input))
;; Test suite for input module
(test-begin "input-module")
diff --git a/tests/physics-test.scm b/tests/physics-test.scm
index 76b480c..e22c2fd 100644
--- a/tests/physics-test.scm
+++ b/tests/physics-test.scm
@@ -7,7 +7,7 @@
(only srfi-1 every member make-list fold iota))
;; Create a mock tilemap module to avoid SDL dependency
-(module downstroke-tilemap *
+(module (downstroke tilemap) *
(import scheme (chicken base) defstruct)
(defstruct tileset
@@ -35,11 +35,11 @@
layers
objects))
-(import downstroke-tilemap)
+(import (downstroke tilemap))
;; Load entity module first (since world now imports entity)
(include "entity.scm")
-(import downstroke-entity)
+(import (downstroke entity))
(import (only (list-utils alist) plist->alist))
@@ -48,15 +48,15 @@
;; Load world module first
(include "world.scm")
-(import downstroke-world)
+(import (downstroke world))
;; Load physics module
(include "physics.scm")
-(import downstroke-physics)
+(import (downstroke physics))
;; Load physics module
(include "input.scm")
-(import downstroke-input)
+(import (downstroke input))
;; Test suite for physics module
(test-begin "physics-module")
diff --git a/tests/prefabs-test.scm b/tests/prefabs-test.scm
index 8eaf348..06f9ba9 100644
--- a/tests/prefabs-test.scm
+++ b/tests/prefabs-test.scm
@@ -7,8 +7,8 @@
defstruct
test)
-;; Mock downstroke-entity
-(module downstroke-entity *
+;; Mock (downstroke entity)
+(module (downstroke entity) *
(import scheme (chicken base))
(define (entity-ref entity key #!optional (default #f))
(let loop ((plist entity))
@@ -23,14 +23,14 @@
((eq? (car plist) key) (append (reverse acc) (list key val) (cddr plist)))
(else (loop (cddr plist) (cons (cadr plist) (cons (car plist) acc)))))))
(define (entity-type entity) (entity-ref entity #:type #f)))
-(import downstroke-entity)
+(import (downstroke entity))
;; Load module under test
(include "entity.scm")
-(import downstroke-entity)
+(import (downstroke entity))
(include "prefabs.scm")
-(import downstroke-prefabs)
+(import (downstroke prefabs))
(test-begin "prefabs")
diff --git a/tests/renderer-test.scm b/tests/renderer-test.scm
index 702a712..3a85c73 100644
--- a/tests/renderer-test.scm
+++ b/tests/renderer-test.scm
@@ -8,7 +8,7 @@
test)
;; Mock tilemap module
-(module downstroke-tilemap *
+(module (downstroke tilemap) *
(import scheme (chicken base) defstruct)
(defstruct tileset tilewidth tileheight spacing tilecount columns image-source image)
(defstruct layer name width height map)
@@ -16,7 +16,7 @@
(defstruct tile id rect)
(define (tileset-tile ts id) (make-tile id: id rect: #f))
(define (tile-rect t) #f))
-(import downstroke-tilemap)
+(import (downstroke tilemap))
;; Mock sdl2
(module sdl2 *
@@ -40,7 +40,7 @@
;; Load entity module
(include "entity.scm")
-(import downstroke-entity)
+(import (downstroke entity))
(import (only (list-utils alist) plist->alist))
@@ -49,11 +49,11 @@
;; Load world module
(include "world.scm")
-(import downstroke-world)
+(import (downstroke world))
;; Load renderer module
(include "renderer.scm")
-(import downstroke-renderer)
+(import (downstroke renderer))
(test-begin "renderer")
diff --git a/tests/scene-loader-test.scm b/tests/scene-loader-test.scm
index f2ebde0..e86ea42 100644
--- a/tests/scene-loader-test.scm
+++ b/tests/scene-loader-test.scm
@@ -7,7 +7,7 @@
test)
;; Mock tilemap module
-(module downstroke-tilemap *
+(module (downstroke tilemap) *
(import scheme (chicken base) defstruct)
(defstruct tileset tilewidth tileheight spacing tilecount columns image-source image)
(defstruct layer name width height map)
@@ -18,11 +18,11 @@
(define (tile-rect t) #f)
(define (load-tilemap filename) (make-tilemap width: 100 height: 100 tilewidth: 16 tileheight: 16 tileset-source: "" tileset: (make-tileset tilewidth: 16 tileheight: 16 spacing: 0 tilecount: 256 columns: 16 image-source: "" image: #f) layers: '() objects: '()))
(define (load-tileset filename) (make-tileset tilewidth: 16 tileheight: 16 spacing: 0 tilecount: 256 columns: 16 image-source: "" image: #f)))
-(import downstroke-tilemap)
+(import (downstroke tilemap))
;; Load the real entity module (alist-based)
(include "entity.scm")
-(import downstroke-entity)
+(import (downstroke entity))
(import (only (list-utils alist) plist->alist))
@@ -30,28 +30,28 @@
(define (entity . kws) (plist->alist kws))
;; Mock world module
-(module downstroke-world *
+(module (downstroke world) *
(import scheme (chicken base) defstruct)
(defstruct camera x y)
(defstruct scene entities tilemap tileset camera tileset-texture camera-target background engine-update)
(define (scene-add-entity scene entity)
(update-scene scene
entities: (append (scene-entities scene) (list entity)))))
-(import downstroke-world)
+(import (downstroke world))
;; Mock assets module
-(module downstroke-assets *
+(module (downstroke assets) *
(import scheme (chicken base))
(define (asset-set! assets key value) #f))
-(import downstroke-assets)
+(import (downstroke assets))
;; Mock engine module
-(module downstroke-engine *
+(module (downstroke engine) *
(import scheme (chicken base))
(define (game-renderer game) #f)
(define (game-asset-set! game key value) #f)
(define (game-scene-set! game scene) #f))
-(import downstroke-engine)
+(import (downstroke engine))
;; Mock sdl2
(module sdl2 *
@@ -65,19 +65,19 @@
(define (open-font filename size) (list 'font filename size)))
(import (prefix sdl2-ttf "ttf:"))
-;; Mock downstroke-prefabs
+;; Mock (downstroke prefabs)
;; The mock registry is just an alist ((type . constructor) ...) for test simplicity.
;; instantiate-prefab maps to the constructor call.
-(module downstroke-prefabs *
+(module (downstroke prefabs) *
(import scheme (chicken base))
(define (instantiate-prefab registry type x y w h)
(let ((entry (assq type registry)))
(and entry ((cdr entry) x y w h)))))
-(import downstroke-prefabs)
+(import (downstroke prefabs))
;; Load scene-loader module
(include "scene-loader.scm")
-(import downstroke-scene-loader)
+(import (downstroke scene-loader))
(test-begin "scene-loader")
diff --git a/tests/tilemap-test.scm b/tests/tilemap-test.scm
index 282400f..3fe5cfe 100644
--- a/tests/tilemap-test.scm
+++ b/tests/tilemap-test.scm
@@ -20,7 +20,7 @@
;; Load the module source directly
(include "tilemap.scm")
;; Now import it to access the exported functions
-(import downstroke-tilemap)
+(import (downstroke tilemap))
;; Test suite for tilemap module
(test-begin "tilemap-module")
diff --git a/tests/tween-test.scm b/tests/tween-test.scm
index 51675b8..31b4de3 100644
--- a/tests/tween-test.scm
+++ b/tests/tween-test.scm
@@ -2,7 +2,7 @@
(chicken base))
(include "entity.scm")
(include "tween.scm")
-(import downstroke-entity downstroke-tween)
+(import (downstroke entity) (downstroke tween))
(import (only (list-utils alist) plist->alist))
diff --git a/tests/world-test.scm b/tests/world-test.scm
index 8cbe4f2..0915cd2 100644
--- a/tests/world-test.scm
+++ b/tests/world-test.scm
@@ -7,7 +7,7 @@
(only srfi-1 every member make-list))
;; Create a mock tilemap module to avoid SDL dependency
-(module downstroke-tilemap *
+(module (downstroke tilemap) *
(import scheme (chicken base) defstruct)
(defstruct tileset
@@ -35,11 +35,11 @@
layers
objects))
-(import downstroke-tilemap)
+(import (downstroke tilemap))
;; Load entity module first (since world now imports entity)
(include "entity.scm")
-(import downstroke-entity)
+(import (downstroke entity))
(import (only (list-utils alist) plist->alist))
@@ -49,7 +49,7 @@
;; Load the module source directly
(include "world.scm")
;; Now import it to access the exported functions
-(import downstroke-world)
+(import (downstroke world))
;; Test suite for world module
(test-begin "world-module")