Skip to content

Commit 62200f0

Browse files
authored
drop 0.3, 0.4 fix deprecation test, 0.6 and nightly (#21)
1 parent a2048f5 commit 62200f0

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

.travis.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ os:
33
- linux
44
- osx
55
julia:
6-
- 0.3
7-
- 0.4
6+
- 0.5
7+
- 0.6
88
- nightly
9+
10+
matrix:
11+
allow_failures:
12+
- julia: nightly
13+
914
notifications:
1015
email: false
11-
script:
12-
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
13-
- julia -e 'Pkg.clone(pwd()); Pkg.build("Quaternions"); Pkg.test("Quaternions"; coverage=true)'
16+
1417
after_success:
1518
- julia -e 'cd(Pkg.dir("Quaternions")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'

REQUIRE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
julia 0.3
2-
1+
julia 0.5
32
DualNumbers
43
Compat 0.7.15

src/Quaternions.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION >= v"0.4.0-dev+6521" && __precompile__()
1+
__precompile__()
22

33
module Quaternions
44
importall Base

test/test_Quaternion.jl

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,42 @@ end
2525

2626
let # test rotations
2727
qx = qrotation([1,0,0], pi/4)
28-
@test_approx_eq qx*qx qrotation([1,0,0], pi/2)
29-
@test_approx_eq qx^2 qrotation([1,0,0], pi/2)
28+
@test qx*qx qrotation([1,0,0], pi/2)
29+
@test qx^2 qrotation([1,0,0], pi/2)
3030
theta = pi/8
3131
qx = qrotation([1,0,0], theta)
3232
c = cos(theta); s = sin(theta)
3333
Rx = [1 0 0; 0 c -s; 0 s c]
34-
@test_approx_eq rotationmatrix(qx) Rx
34+
@test rotationmatrix(qx) Rx
3535
theta = pi/6
3636
qy = qrotation([0,1,0], theta)
3737
c = cos(theta); s = sin(theta)
3838
Ry = [c 0 s; 0 1 0; -s 0 c]
39-
@test_approx_eq rotationmatrix(qy) Ry
39+
@test rotationmatrix(qy) Ry
4040
theta = 4pi/3
4141
qz = qrotation([0,0,1], theta)
4242
c = cos(theta); s = sin(theta)
4343
Rz = [c -s 0; s c 0; 0 0 1]
44-
@test_approx_eq rotationmatrix(qz) Rz
44+
@test rotationmatrix(qz) Rz
4545

46-
@test_approx_eq rotationmatrix(qx*qy*qz) Rx*Ry*Rz
47-
@test_approx_eq rotationmatrix(qy*qx*qz) Ry*Rx*Rz
48-
@test_approx_eq rotationmatrix(qz*qx*qy) Rz*Rx*Ry
46+
@test rotationmatrix(qx*qy*qz) Rx*Ry*Rz
47+
@test rotationmatrix(qy*qx*qz) Ry*Rx*Rz
48+
@test rotationmatrix(qz*qx*qy) Rz*Rx*Ry
4949

5050
a, b = qrotation([0,0,1], deg2rad(0)), qrotation([0,0,1], deg2rad(180))
51-
@test_approx_eq slerp(a,b,0.0) a
52-
@test_approx_eq slerp(a,b,1.0) b
53-
@test_approx_eq slerp(a,b,0.5) qrotation([0,0,1], deg2rad(90))
54-
55-
@test_approx_eq angle(qrotation([1,0,0], 0)) 0
56-
@test_approx_eq angle(qrotation([0,1,0], pi/4)) pi/4
57-
@test_approx_eq angle(qrotation([0,0,1], pi/2)) pi/2
58-
51+
@test slerp(a,b,0.0) a
52+
@test slerp(a,b,1.0) b
53+
@test slerp(a,b,0.5) qrotation([0,0,1], deg2rad(90))
5954

55+
@test angle(qrotation([1,0,0], 0)) 0
56+
@test angle(qrotation([0,1,0], pi/4)) pi/4
57+
@test angle(qrotation([0,0,1], pi/2)) pi/2
6058

6159
let # test numerical stability of angle
6260
ax = randn(3)
6361
for θ in [1e-9, π - 1e-9]
6462
q = qrotation(ax, θ)
65-
@test_approx_eq angle(q) θ
63+
@test angle(q) θ
6664
end
6765
end
6866
end

0 commit comments

Comments
 (0)