Skip to content

Commit 55bc4ec

Browse files
committed
Update test for 1.10
1 parent 22e9c68 commit 55bc4ec

File tree

2 files changed

+13
-233
lines changed

2 files changed

+13
-233
lines changed

.github/workflows/BuildArtifacts.yml

Lines changed: 0 additions & 224 deletions
This file was deleted.

test/test_bench.jl

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,36 +81,40 @@ end
8181
SymbolicAWEModels.get_aero_force_override(sys, idx, 1)
8282
SymbolicAWEModels.get_aero_moment_override(sys, idx, 1)
8383

84+
# Julia 1.11 has extra allocations in @register_symbolic
85+
# accessors that 1.12+ optimizes away.
86+
v11 = VERSION < v"1.12"
87+
8488
@testset "@register_symbolic" begin
8589
a = @allocations SymbolicAWEModels.get_l0(sys, idx)
86-
@test a == 0
90+
@test a <= (v11 ? 2 : 0)
8791
a = @allocations SymbolicAWEModels.get_extra_mass(
8892
sys, idx)
89-
@test a == 0
93+
@test a <= (v11 ? 2 : 0)
9094
a = @allocations SymbolicAWEModels.get_pos_w(
9195
sys, idx)
9296
@test a <= 1
9397
a = @allocations SymbolicAWEModels.get_Q_b_to_w(
9498
sys, idx)
95-
@test a == 0
99+
@test a <= (v11 ? 1 : 0)
96100
a = @allocations SymbolicAWEModels.get_com_w(
97101
sys, idx)
98-
@test a == 0
102+
@test a <= (v11 ? 1 : 0)
99103
a = @allocations SymbolicAWEModels.get_R_b_to_p(
100104
sys, idx)
101-
@test a == 0
105+
@test a <= (v11 ? 1 : 0)
102106
a = @allocations SymbolicAWEModels.get_inertia_principal(
103107
sys, idx)
104-
@test a == 0
108+
@test a <= (v11 ? 1 : 0)
105109
end
106110

107111
@testset "VSM accessors" begin
108112
a = @allocations SymbolicAWEModels.get_vsm_y(
109113
sys, idx, 1)
110-
@test a == 0
114+
@test a <= (v11 ? 2 : 0)
111115
a = @allocations SymbolicAWEModels.get_vsm_x(
112116
sys, idx, 1)
113-
@test a == 0
117+
@test a <= (v11 ? 2 : 0)
114118
a = @allocations SymbolicAWEModels.get_vsm_jac(
115119
sys, idx, 1, 1)
116120
@test a <= 2
@@ -119,7 +123,7 @@ end
119123
@test a <= 4
120124
a = @allocations SymbolicAWEModels.get_aero_moment_override(
121125
sys, idx, 1)
122-
@test a == 0
126+
@test a <= (v11 ? 2 : 0)
123127
end
124128

125129
@testset "No package allocations in RHS" begin

0 commit comments

Comments
 (0)