Skip to content

Commit 51a48da

Browse files
committed
set up dual testing with Test and ReTest
1 parent 13d07d3 commit 51a48da

4 files changed

Lines changed: 14 additions & 9 deletions

File tree

Project.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
99

1010
[extras]
1111
ReTest = "e0db7c4e-2690-44b9-bad6-7687da720f89"
12+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1213

1314
[targets]
14-
test = ["ReTest"]
15+
test = ["ReTest", "Test"]
1516

1617
[compat]
1718
ReTest = "0.2"

test/RandomExtensionsTests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module RandomExtensionsTests
2+
3+
using ReTest
4+
include("tests.jl")
5+
6+
end

test/runtests.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
module RandomExtensionsTests
2+
3+
using Test
14
include("tests.jl")
25

3-
RandomExtensionsTests.runtests(RandomExtensionsTests)
4-
RandomExtensionsTests.runtests(RandomExtensionsTests.TestAtRand)
6+
end

test/tests.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
module RandomExtensionsTests
2-
31
using RandomExtensions, Random, SparseArrays
42
using Random: Sampler, gentype
5-
using ReTest
63

74
@testset "Distributions" begin
85
# Normal/Exponential
@@ -749,7 +746,8 @@ end
749746
module TestAtRand
750747
# only using RandomExtensions, not Random, to check we don't depend on
751748
# some imported names like e.g. SamplerTrivial
752-
using RandomExtensions, ReTest
749+
using RandomExtensions
750+
using ..RandomExtensionsTests: @test, @testset
753751

754752
struct Die n end
755753

@@ -763,5 +761,3 @@ struct Die n end
763761
end
764762

765763
end # module TestAtRand
766-
767-
end # module RandomExtensionsTests

0 commit comments

Comments
 (0)