Skip to content

Commit 7b43cd6

Browse files
yikait2dkarrasch
authored andcommitted
Testings on Octonions (#41)
1 parent 5baaaba commit 7b43cd6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

test/runtests.jl

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,25 @@ end
423423
@test Array* L) == α * A
424424
@test Array(L * α) == A * α
425425
@test Array* L) == α * A
426-
@test Array(L * α ) == A * α
426+
@test Array(L * α) == A * α
427427
@test* L')' * x * A')' * x
428428
@test* L')' * v * A')' * v
429429
@test Array(@inferred adjoint* L * β)) conj(β) * A' * conj(α)
430430
@test Array(@inferred transpose* L * β)) β * transpose(A) * α
431431
end
432+
433+
@testset "nonassociative number type" begin
434+
using Quaternions
435+
x = Octonion.(rand(10), rand(10), rand(10), rand(10),rand(10), rand(10), rand(10), rand(10))
436+
v = rand(10)
437+
A = Octonion.(rand(10,10), rand(10,10), rand(10,10), rand(10,10),rand(10,10), rand(10,10), rand(10,10), rand(10,10))
438+
α = UniformScaling(Octonion.(rand(8)...))
439+
β = UniformScaling(Octonion.(rand(8)...))
440+
L = LinearMap(A)
441+
@test Array(L) == A
442+
@test Array* L) == α * A
443+
@test Array(L * α) == A * α
444+
@test Array* L) == α * A
445+
@test Array(L * α) == A * α
446+
@test* L')' * v * A')' * v
447+
end

0 commit comments

Comments
 (0)