Skip to content

Commit

Permalink
add Aqua.jl tests (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLampert authored Mar 15, 2024
1 parent 7cc1760 commit 3dee1b2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# T8code.jl

[![All Tests Status](https://github.com/DLR-AMR/T8code.jl/actions/workflows/test.yml/badge.svg)](https://github.com/DLR-AMR/T8code.jl/actions/workflows/test.yml)
[![Aqua QA](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)


Expand Down
4 changes: 2 additions & 2 deletions src/Libt8.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Libt8

using CEnum
using CEnum: CEnum, @cenum

to_c_type(t::Type) = t
to_c_type_pairs(va_list) = map(enumerate(to_c_type.(va_list))) do (ind, type)
Expand Down Expand Up @@ -41,7 +41,7 @@ end
const ptrdiff_t = Cptrdiff_t

# Definitions used from MPI.jl
using MPI: MPI, MPI_Datatype, MPI_Comm, MPI_Group, MPI_File
using MPI: MPI, MPI_Datatype, MPI_Comm, MPI_File

const MPI_COMM_WORLD = MPI.COMM_WORLD
const MPI_COMM_SELF = MPI.COMM_SELF
Expand Down
2 changes: 1 addition & 1 deletion src/T8code.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module T8code

using Reexport: @reexport
using Libdl
using Libdl: Libdl

using MPIPreferences: MPIPreferences
# We need to load the preference setting from here and not from `Libt8.jl`
Expand Down
2 changes: 2 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.7, 0.8"
MPI = "0.20"
MPIPreferences = "0.1.3"
Test = "1"
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import MPIPreferences
@info "Testing T8code.jl with" MPIPreferences.binary MPIPreferences.abi

@time @testset "T8code.jl tests" begin
include("test_aqua.jl")
# For some weird reason, the MPI tests must come first since they fail
# otherwise with a custom MPI installation.
@time @testset "MPI" begin
Expand Down
11 changes: 11 additions & 0 deletions test/test_aqua.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TestAqua

using Aqua
using Test
using T8code

@testset "Aqua.jl" begin
Aqua.test_all(T8code)
end

end #module

0 comments on commit 3dee1b2

Please sign in to comment.