From f0674e19c0dd2bf23eb33578a4d84797c8462316 Mon Sep 17 00:00:00 2001 From: Michael Kraus Date: Sat, 24 Oct 2020 11:37:20 +0200 Subject: [PATCH] Add lots of new tests for generated functions. --- test/test_analytic.jl | 242 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) diff --git a/test/test_analytic.jl b/test/test_analytic.jl index a50e140..22981f5 100644 --- a/test/test_analytic.jl +++ b/test/test_analytic.jl @@ -42,6 +42,106 @@ macro test_equilibrium(equilibrium_module, equilibrium_periodicity) @test x²(t, ξ...) == x²(t,ξ) @test x³(t, ξ...) == x³(t,ξ) + @test g₁₁(t, ξ...) == g₁₁(t, ξ) + @test g₁₂(t, ξ...) == g₁₂(t, ξ) + @test g₁₃(t, ξ...) == g₁₃(t, ξ) + @test g₂₁(t, ξ...) == g₂₁(t, ξ) + @test g₂₂(t, ξ...) == g₂₂(t, ξ) + @test g₂₃(t, ξ...) == g₂₃(t, ξ) + @test g₃₁(t, ξ...) == g₃₁(t, ξ) + @test g₃₂(t, ξ...) == g₃₂(t, ξ) + @test g₃₃(t, ξ...) == g₃₃(t, ξ) + + @test g¹¹(t, ξ...) == g¹¹(t,ξ) + @test g¹²(t, ξ...) == g¹²(t,ξ) + @test g¹³(t, ξ...) == g¹³(t,ξ) + @test g²¹(t, ξ...) == g²¹(t,ξ) + @test g²²(t, ξ...) == g²²(t,ξ) + @test g²³(t, ξ...) == g²³(t,ξ) + @test g³¹(t, ξ...) == g³¹(t,ξ) + @test g³²(t, ξ...) == g³²(t,ξ) + @test g³³(t, ξ...) == g³³(t,ξ) + + @test DF₁₁(t, ξ...) == DF₁₁(t, ξ) + @test DF₁₂(t, ξ...) == DF₁₂(t, ξ) + @test DF₁₃(t, ξ...) == DF₁₃(t, ξ) + @test DF₂₁(t, ξ...) == DF₂₁(t, ξ) + @test DF₂₂(t, ξ...) == DF₂₂(t, ξ) + @test DF₂₃(t, ξ...) == DF₂₃(t, ξ) + @test DF₃₁(t, ξ...) == DF₃₁(t, ξ) + @test DF₃₂(t, ξ...) == DF₃₂(t, ξ) + @test DF₃₃(t, ξ...) == DF₃₃(t, ξ) + + @test DF̄₁₁(t, ξ...) == DF̄₁₁(t, ξ) + @test DF̄₁₂(t, ξ...) == DF̄₁₂(t, ξ) + @test DF̄₁₃(t, ξ...) == DF̄₁₃(t, ξ) + @test DF̄₂₁(t, ξ...) == DF̄₂₁(t, ξ) + @test DF̄₂₂(t, ξ...) == DF̄₂₂(t, ξ) + @test DF̄₂₃(t, ξ...) == DF̄₂₃(t, ξ) + @test DF̄₃₁(t, ξ...) == DF̄₃₁(t, ξ) + @test DF̄₃₂(t, ξ...) == DF̄₃₂(t, ξ) + @test DF̄₃₃(t, ξ...) == DF̄₃₃(t, ξ) + + @test dg₁₁dx₁(t, ξ...) == dg₁₁dx₁(t, ξ) + @test dg₁₂dx₁(t, ξ...) == dg₁₂dx₁(t, ξ) + @test dg₁₃dx₁(t, ξ...) == dg₁₃dx₁(t, ξ) + @test dg₂₁dx₁(t, ξ...) == dg₂₁dx₁(t, ξ) + @test dg₂₂dx₁(t, ξ...) == dg₂₂dx₁(t, ξ) + @test dg₂₃dx₁(t, ξ...) == dg₂₃dx₁(t, ξ) + @test dg₃₁dx₁(t, ξ...) == dg₃₁dx₁(t, ξ) + @test dg₃₂dx₁(t, ξ...) == dg₃₂dx₁(t, ξ) + @test dg₃₃dx₁(t, ξ...) == dg₃₃dx₁(t, ξ) + + @test dg₁₁dx₂(t, ξ...) == dg₁₁dx₂(t, ξ) + @test dg₁₂dx₂(t, ξ...) == dg₁₂dx₂(t, ξ) + @test dg₁₃dx₂(t, ξ...) == dg₁₃dx₂(t, ξ) + @test dg₂₁dx₂(t, ξ...) == dg₂₁dx₂(t, ξ) + @test dg₂₂dx₂(t, ξ...) == dg₂₂dx₂(t, ξ) + @test dg₂₃dx₂(t, ξ...) == dg₂₃dx₂(t, ξ) + @test dg₃₁dx₂(t, ξ...) == dg₃₁dx₂(t, ξ) + @test dg₃₂dx₂(t, ξ...) == dg₃₂dx₂(t, ξ) + @test dg₃₃dx₂(t, ξ...) == dg₃₃dx₂(t, ξ) + + @test dg₁₁dx₃(t, ξ...) == dg₁₁dx₃(t, ξ) + @test dg₁₂dx₃(t, ξ...) == dg₁₂dx₃(t, ξ) + @test dg₁₃dx₃(t, ξ...) == dg₁₃dx₃(t, ξ) + @test dg₂₁dx₃(t, ξ...) == dg₂₁dx₃(t, ξ) + @test dg₂₂dx₃(t, ξ...) == dg₂₂dx₃(t, ξ) + @test dg₂₃dx₃(t, ξ...) == dg₂₃dx₃(t, ξ) + @test dg₃₁dx₃(t, ξ...) == dg₃₁dx₃(t, ξ) + @test dg₃₂dx₃(t, ξ...) == dg₃₂dx₃(t, ξ) + @test dg₃₃dx₃(t, ξ...) == dg₃₃dx₃(t, ξ) + + @test dg¹¹dx₁(t, ξ...) == dg¹¹dx₁(t,ξ) + @test dg¹²dx₁(t, ξ...) == dg¹²dx₁(t,ξ) + @test dg¹³dx₁(t, ξ...) == dg¹³dx₁(t,ξ) + @test dg²¹dx₁(t, ξ...) == dg²¹dx₁(t,ξ) + @test dg²²dx₁(t, ξ...) == dg²²dx₁(t,ξ) + @test dg²³dx₁(t, ξ...) == dg²³dx₁(t,ξ) + @test dg³¹dx₁(t, ξ...) == dg³¹dx₁(t,ξ) + @test dg³²dx₁(t, ξ...) == dg³²dx₁(t,ξ) + @test dg³³dx₁(t, ξ...) == dg³³dx₁(t,ξ) + + @test dg¹¹dx₂(t, ξ...) == dg¹¹dx₂(t,ξ) + @test dg¹²dx₂(t, ξ...) == dg¹²dx₂(t,ξ) + @test dg¹³dx₂(t, ξ...) == dg¹³dx₂(t,ξ) + @test dg²¹dx₂(t, ξ...) == dg²¹dx₂(t,ξ) + @test dg²²dx₂(t, ξ...) == dg²²dx₂(t,ξ) + @test dg²³dx₂(t, ξ...) == dg²³dx₂(t,ξ) + @test dg³¹dx₂(t, ξ...) == dg³¹dx₂(t,ξ) + @test dg³²dx₂(t, ξ...) == dg³²dx₂(t,ξ) + @test dg³³dx₂(t, ξ...) == dg³³dx₂(t,ξ) + + @test dg¹¹dx₃(t, ξ...) == dg¹¹dx₃(t,ξ) + @test dg¹²dx₃(t, ξ...) == dg¹²dx₃(t,ξ) + @test dg¹³dx₃(t, ξ...) == dg¹³dx₃(t,ξ) + @test dg²¹dx₃(t, ξ...) == dg²¹dx₃(t,ξ) + @test dg²²dx₃(t, ξ...) == dg²²dx₃(t,ξ) + @test dg²³dx₃(t, ξ...) == dg²³dx₃(t,ξ) + @test dg³¹dx₃(t, ξ...) == dg³¹dx₃(t,ξ) + @test dg³²dx₃(t, ξ...) == dg³²dx₃(t,ξ) + @test dg³³dx₃(t, ξ...) == dg³³dx₃(t,ξ) + @test X(t, ξ...) == X(t,ξ) @test Y(t, ξ...) == Y(t,ξ) @test Z(t, ξ...) == Z(t,ξ) @@ -58,10 +158,18 @@ macro test_equilibrium(equilibrium_module, equilibrium_periodicity) @test B₂(t, ξ...) == B₂(t,ξ) @test B₃(t, ξ...) == B₃(t,ξ) + @test a₁(t, ξ...) == a₁(t,ξ) + @test a₂(t, ξ...) == a₂(t,ξ) + @test a₃(t, ξ...) == a₃(t,ξ) + @test b₁(t, ξ...) == b₁(t,ξ) @test b₂(t, ξ...) == b₂(t,ξ) @test b₃(t, ξ...) == b₃(t,ξ) + @test c₁(t, ξ...) == c₁(t,ξ) + @test c₂(t, ξ...) == c₂(t,ξ) + @test c₃(t, ξ...) == c₃(t,ξ) + @test E₁(t, ξ...) == E₁(t,ξ) @test E₂(t, ξ...) == E₂(t,ξ) @test E₃(t, ξ...) == E₃(t,ξ) @@ -74,14 +182,38 @@ macro test_equilibrium(equilibrium_module, equilibrium_periodicity) @test B²(t, ξ...) == B²(t,ξ) @test B³(t, ξ...) == B³(t,ξ) + @test a¹(t, ξ...) == a¹(t,ξ) + @test a²(t, ξ...) == a²(t,ξ) + @test a³(t, ξ...) == a³(t,ξ) + @test b¹(t, ξ...) == b¹(t,ξ) @test b²(t, ξ...) == b²(t,ξ) @test b³(t, ξ...) == b³(t,ξ) + @test c¹(t, ξ...) == c¹(t,ξ) + @test c²(t, ξ...) == c²(t,ξ) + @test c³(t, ξ...) == c³(t,ξ) + @test E¹(t, ξ...) == E¹(t,ξ) @test E²(t, ξ...) == E²(t,ξ) @test E³(t, ξ...) == E³(t,ξ) + @test B₍₁₎(t, ξ...) == B₍₁₎(t,ξ) + @test B₍₂₎(t, ξ...) == B₍₂₎(t,ξ) + @test B₍₃₎(t, ξ...) == B₍₃₎(t,ξ) + + @test a₍₁₎(t, ξ...) == a₍₁₎(t,ξ) + @test a₍₂₎(t, ξ...) == a₍₂₎(t,ξ) + @test a₍₃₎(t, ξ...) == a₍₃₎(t,ξ) + + @test b₍₁₎(t, ξ...) == b₍₁₎(t,ξ) + @test b₍₂₎(t, ξ...) == b₍₂₎(t,ξ) + @test b₍₃₎(t, ξ...) == b₍₃₎(t,ξ) + + @test c₍₁₎(t, ξ...) == c₍₁₎(t,ξ) + @test c₍₂₎(t, ξ...) == c₍₂₎(t,ξ) + @test c₍₃₎(t, ξ...) == c₍₃₎(t,ξ) + @test dA₁dx₁(t, ξ...) == dA₁dx₁(t,ξ) @test dA₁dx₂(t, ξ...) == dA₁dx₂(t,ξ) @test dA₁dx₃(t, ξ...) == dA₁dx₃(t,ξ) @@ -93,8 +225,118 @@ macro test_equilibrium(equilibrium_module, equilibrium_periodicity) @test dA₃dx₁(t, ξ...) == dA₃dx₁(t,ξ) @test dA₃dx₂(t, ξ...) == dA₃dx₂(t,ξ) @test dA₃dx₃(t, ξ...) == dA₃dx₃(t,ξ) + + @test dB₁dx₁(t, ξ...) == dB₁dx₁(t,ξ) + @test dB₁dx₂(t, ξ...) == dB₁dx₂(t,ξ) + @test dB₁dx₃(t, ξ...) == dB₁dx₃(t,ξ) + + @test dB₂dx₁(t, ξ...) == dB₂dx₁(t,ξ) + @test dB₂dx₂(t, ξ...) == dB₂dx₂(t,ξ) + @test dB₂dx₃(t, ξ...) == dB₂dx₃(t,ξ) + + @test dB₃dx₁(t, ξ...) == dB₃dx₁(t,ξ) + @test dB₃dx₂(t, ξ...) == dB₃dx₂(t,ξ) + @test dB₃dx₃(t, ξ...) == dB₃dx₃(t,ξ) + + @test db₁dx₁(t, ξ...) == db₁dx₁(t,ξ) + @test db₁dx₂(t, ξ...) == db₁dx₂(t,ξ) + @test db₁dx₃(t, ξ...) == db₁dx₃(t,ξ) + + @test db₂dx₁(t, ξ...) == db₂dx₁(t,ξ) + @test db₂dx₂(t, ξ...) == db₂dx₂(t,ξ) + @test db₂dx₃(t, ξ...) == db₂dx₃(t,ξ) + + @test db₃dx₁(t, ξ...) == db₃dx₁(t,ξ) + @test db₃dx₂(t, ξ...) == db₃dx₂(t,ξ) + @test db₃dx₃(t, ξ...) == db₃dx₃(t,ξ) + + @test dBdx₁(t, ξ...) == dBdx₁(t,ξ) + @test dBdx₂(t, ξ...) == dBdx₂(t,ξ) + @test dBdx₃(t, ξ...) == dBdx₃(t,ξ) + + @test d²A₁dx₁dx₁(t, ξ...) == d²A₁dx₁dx₁(t,ξ) + @test d²A₁dx₁dx₂(t, ξ...) == d²A₁dx₁dx₂(t,ξ) + @test d²A₁dx₁dx₃(t, ξ...) == d²A₁dx₁dx₃(t,ξ) + + @test d²A₁dx₂dx₁(t, ξ...) == d²A₁dx₂dx₁(t,ξ) + @test d²A₁dx₂dx₂(t, ξ...) == d²A₁dx₂dx₂(t,ξ) + @test d²A₁dx₂dx₃(t, ξ...) == d²A₁dx₂dx₃(t,ξ) + + @test d²A₁dx₃dx₁(t, ξ...) == d²A₁dx₃dx₁(t,ξ) + @test d²A₁dx₃dx₂(t, ξ...) == d²A₁dx₃dx₂(t,ξ) + @test d²A₁dx₃dx₃(t, ξ...) == d²A₁dx₃dx₃(t,ξ) + + @test d²A₂dx₁dx₁(t, ξ...) == d²A₂dx₁dx₁(t,ξ) + @test d²A₂dx₁dx₂(t, ξ...) == d²A₂dx₁dx₂(t,ξ) + @test d²A₂dx₁dx₃(t, ξ...) == d²A₂dx₁dx₃(t,ξ) + + @test d²A₂dx₂dx₁(t, ξ...) == d²A₂dx₂dx₁(t,ξ) + @test d²A₂dx₂dx₂(t, ξ...) == d²A₂dx₂dx₂(t,ξ) + @test d²A₂dx₂dx₃(t, ξ...) == d²A₂dx₂dx₃(t,ξ) + + @test d²A₂dx₃dx₁(t, ξ...) == d²A₂dx₃dx₁(t,ξ) + @test d²A₂dx₃dx₂(t, ξ...) == d²A₂dx₃dx₂(t,ξ) + @test d²A₂dx₃dx₃(t, ξ...) == d²A₂dx₃dx₃(t,ξ) + + @test d²A₃dx₁dx₁(t, ξ...) == d²A₃dx₁dx₁(t,ξ) + @test d²A₃dx₁dx₂(t, ξ...) == d²A₃dx₁dx₂(t,ξ) + @test d²A₃dx₁dx₃(t, ξ...) == d²A₃dx₁dx₃(t,ξ) + + @test d²A₃dx₂dx₁(t, ξ...) == d²A₃dx₂dx₁(t,ξ) + @test d²A₃dx₂dx₂(t, ξ...) == d²A₃dx₂dx₂(t,ξ) + @test d²A₃dx₂dx₃(t, ξ...) == d²A₃dx₂dx₃(t,ξ) + + @test d²A₃dx₃dx₁(t, ξ...) == d²A₃dx₃dx₁(t,ξ) + @test d²A₃dx₃dx₂(t, ξ...) == d²A₃dx₃dx₂(t,ξ) + @test d²A₃dx₃dx₃(t, ξ...) == d²A₃dx₃dx₃(t,ξ) + + @test d²b₁dx₁dx₁(t, ξ...) == d²b₁dx₁dx₁(t,ξ) + @test d²b₁dx₁dx₂(t, ξ...) == d²b₁dx₁dx₂(t,ξ) + @test d²b₁dx₁dx₃(t, ξ...) == d²b₁dx₁dx₃(t,ξ) + + @test d²b₁dx₂dx₁(t, ξ...) == d²b₁dx₂dx₁(t,ξ) + @test d²b₁dx₂dx₂(t, ξ...) == d²b₁dx₂dx₂(t,ξ) + @test d²b₁dx₂dx₃(t, ξ...) == d²b₁dx₂dx₃(t,ξ) + + @test d²b₁dx₃dx₁(t, ξ...) == d²b₁dx₃dx₁(t,ξ) + @test d²b₁dx₃dx₂(t, ξ...) == d²b₁dx₃dx₂(t,ξ) + @test d²b₁dx₃dx₃(t, ξ...) == d²b₁dx₃dx₃(t,ξ) + + @test d²b₂dx₁dx₁(t, ξ...) == d²b₂dx₁dx₁(t,ξ) + @test d²b₂dx₁dx₂(t, ξ...) == d²b₂dx₁dx₂(t,ξ) + @test d²b₂dx₁dx₃(t, ξ...) == d²b₂dx₁dx₃(t,ξ) + + @test d²b₂dx₂dx₁(t, ξ...) == d²b₂dx₂dx₁(t,ξ) + @test d²b₂dx₂dx₂(t, ξ...) == d²b₂dx₂dx₂(t,ξ) + @test d²b₂dx₂dx₃(t, ξ...) == d²b₂dx₂dx₃(t,ξ) + + @test d²b₂dx₃dx₁(t, ξ...) == d²b₂dx₃dx₁(t,ξ) + @test d²b₂dx₃dx₂(t, ξ...) == d²b₂dx₃dx₂(t,ξ) + @test d²b₂dx₃dx₃(t, ξ...) == d²b₂dx₃dx₃(t,ξ) + + @test d²b₃dx₁dx₁(t, ξ...) == d²b₃dx₁dx₁(t,ξ) + @test d²b₃dx₁dx₂(t, ξ...) == d²b₃dx₁dx₂(t,ξ) + @test d²b₃dx₁dx₃(t, ξ...) == d²b₃dx₁dx₃(t,ξ) + + @test d²b₃dx₂dx₁(t, ξ...) == d²b₃dx₂dx₁(t,ξ) + @test d²b₃dx₂dx₂(t, ξ...) == d²b₃dx₂dx₂(t,ξ) + @test d²b₃dx₂dx₃(t, ξ...) == d²b₃dx₂dx₃(t,ξ) + + @test d²b₃dx₃dx₁(t, ξ...) == d²b₃dx₃dx₁(t,ξ) + @test d²b₃dx₃dx₂(t, ξ...) == d²b₃dx₃dx₂(t,ξ) + @test d²b₃dx₃dx₃(t, ξ...) == d²b₃dx₃dx₃(t,ξ) + + @test d²Bdx₁dx₁(t, ξ...) == d²Bdx₁dx₁(t,ξ) + @test d²Bdx₁dx₂(t, ξ...) == d²Bdx₁dx₂(t,ξ) + @test d²Bdx₁dx₃(t, ξ...) == d²Bdx₁dx₃(t,ξ) + @test d²Bdx₂dx₁(t, ξ...) == d²Bdx₂dx₁(t,ξ) + @test d²Bdx₂dx₂(t, ξ...) == d²Bdx₂dx₂(t,ξ) + @test d²Bdx₂dx₃(t, ξ...) == d²Bdx₂dx₃(t,ξ) + @test d²Bdx₃dx₁(t, ξ...) == d²Bdx₃dx₁(t,ξ) + @test d²Bdx₃dx₂(t, ξ...) == d²Bdx₃dx₂(t,ξ) + @test d²Bdx₃dx₃(t, ξ...) == d²Bdx₃dx₃(t,ξ) @test periodicity(t,ξ...) == $equilibrium_periodicity @test periodicity(t,ξ) == $equilibrium_periodicity