]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - tests/foreign-record.scm
Remove old tests
[guile-irrlicht.git] / tests / foreign-record.scm
diff --git a/tests/foreign-record.scm b/tests/foreign-record.scm
deleted file mode 100644 (file)
index 9bc8dee..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-;;; guile-irrlicht --- FFI bindings for Irrlicht Engine
-;;; Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
-;;;
-;;; This file is part of guile-irrlicht.
-;;;
-;;; Guile-irrlicht is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU Lesser General Public License as
-;;; published by the Free Software Foundation; either version 3 of the
-;;; License, or (at your option) any later version.
-;;;
-;;; Guile-irrlicht is distributed in the hope that it will be useful, but
-;;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;;; General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU Lesser General Public
-;;; License along with guile-irrlicht.  If not, see
-;;; <http://www.gnu.org/licenses/>.
-
-
-(use-modules (system foreign)
-             (srfi srfi-64)
-             (irrlicht util foreign))
-
-(test-begin "foreign-record")
-
-;; Dimension 2D definition
-(define-foreign-record-type dimension2d
-  (make-dimension2d width height)
-  dimension2d?
-  (width uint32 dimension2d-width set-dimension2d-width!)
-  (height uint32 dimension2d-height set-dimension2d-height!))
-
-;; Create dimension
-(define dim (make-dimension2d 10 20))
-(test-assert (dimension2d? dim))
-(test-equal 10 (dimension2d-width dim))
-(test-equal 20 (dimension2d-height dim))
-
-;; Modify dimension
-(set-dimension2d-width! dim 50)
-(set-dimension2d-height! dim 100)
-(test-equal 50 (dimension2d-width dim))
-(test-equal 100 (dimension2d-height dim))
-
-;; Is a pointer
-(test-assert (pointer? (foreign-record->pointer dim)))
-
-;; Foreign record types as types for other foreign records
-(define-foreign-record-type point
-  (make-point x y)
-  point?
-  (x int64 point-x)
-  (y int64 point-y))
-
-(define-foreign-record-type triangle
-  (make-triangle p1 p2 p3)
-  triangle?
-  (p1 point triangle-p1)
-  (p2 point triangle-p2)
-  (p3 point triangle-p3))
-
-;(define tr (make-triangle (make-point 0 10) (make-point -10 5) (make-point 15 -7)))
-;(test-equal -10 (point-x (triangle-p2 tr)))
-
-(test-end "foreign-record")