aports/community/guile-bytestructures/fix-tests.patch
2023-10-23 20:01:47 +00:00

36 lines
1.5 KiB
Diff

The tests in the "aligned" test-group depend on the struct member
alignment of the target architecture and fail presently on i386.
Disable these tests entirely for now as there are not portable.
See: https://github.com/TaylanUB/scheme-bytestructures/issues/47
diff -upr scheme-bytestructures-2.0.1.orig/run-tests.body.scm scheme-bytestructures-2.0.1/run-tests.body.scm
--- scheme-bytestructures-2.0.1.orig/run-tests.body.scm 2023-08-03 21:14:09.124456331 +0200
+++ scheme-bytestructures-2.0.1/run-tests.body.scm 2023-08-03 21:14:15.611143903 +0200
@@ -180,24 +180,6 @@
(union
((a ,uint16)
(b ,uint32))))))
- (test-group "aligned"
- (define bs
- (bytestructure
- (bs:struct
- `((union
- ((x ,uint8)
- (y ,uint16)))
- (union
- ((a ,uint32)
- (b ,uint64)))))))
- (bytevector-u32-native-set! (bytestructure-bytevector bs) 8 321)
- (test-eqv "ref1" 321 (bytestructure-ref bs 'a))
- (bytevector-u64-native-set! (bytestructure-bytevector bs) 8 456)
- (test-eqv "ref2" 456 (bytestructure-ref bs 'b))
- (test-eqv "set1" 789 (begin (bytestructure-set! bs 'a 789)
- (bytestructure-ref bs 'a)))
- (test-eqv "set2" 987 (begin (bytestructure-set! bs 'b 987)
- (bytestructure-ref bs 'b))))
(test-group "packed"
(define bs
(bytestructure
Only in scheme-bytestructures-2.0.1: run-tests.body.scm.orig