Skip to content

Commit

Permalink
Add Aqua tests (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tortar authored Mar 4, 2024
1 parent 7f19564 commit 5b7ce39
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
8 changes: 1 addition & 7 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,8 @@ PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
SumTypes = "8e1ec7a9-0e02-4297-b0fe-6433085c89f2"

[compat]
julia = "1"
julia = "1.6"
ExprTools = "0.1"
MacroTools = "0.5"
PrecompileTools = "1"
SumTypes = "0.5"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![CI](https://github.com/JuliaDynamics/MixedStructTypes.jl/workflows/CI/badge.svg)](https://github.com/JuliaDynamics/MixedStructTypes.jl/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/JuliaDynamics/MixedStructTypes.jl/graph/badge.svg?token=rz9b1WTqCa)](https://codecov.io/gh/JuliaDynamics/MixedStructTypes.jl)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)

This package allows to combine multiple heterogeneous types in a single one. This helps to write type-stable code
by avoiding Union-splitting, which have big performance drawbacks when many types are unionized.
Expand Down
6 changes: 6 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.8"
7 changes: 7 additions & 0 deletions test/package_sanity_tests.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

using Aqua

@testset "Code quality" begin
Aqua.test_all(MixedStructTypes, ambiguities = false, unbound_args = true)
@test Test.detect_ambiguities(MixedStructTypes) == Tuple{Method, Method}[]
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using Test
using MixedStructTypes

@testset "MixedStructTypes.jl Tests" begin
include("package_sanity_tests.jl")
include("sum_structs_macro_tests.jl")
include("compact_structs_macro_tests.jl")
end
Expand Down

0 comments on commit 5b7ce39

Please sign in to comment.