Skip to content

Commit da4e5fd

Browse files
committed
refactor: move tests and use modules to prevent spillover
1 parent ea88cb0 commit da4e5fd

File tree

6 files changed

+20
-11
lines changed

6 files changed

+20
-11
lines changed

test/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
44
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
55
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
66
Lux = "b2108857-7c20-44ae-9111-449ecde12c47"
7+
LuxLib = "82251201-b29d-42c6-8e01-566dec8acb11"
78
MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54"
89
NNlib = "872c559c-99b0-510c-b3b7-b6c96a88d5cd"
910
OneHotArrays = "0b1bfda6-eb8a-41d2-88d8-f5af5cad476f"
1011
Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2"
1112
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1213
Reactant_jll = "0192cb87-2b54-54ad-80e0-3be72ad8a3c0"
14+
SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f"
1315
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1416
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
File renamed without changes.
File renamed without changes.

test/nn/luxlib.jl

Whitespace-only changes.

test/nn/nnlib.jl

Whitespace-only changes.

test/runtests.jl

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Reactant
1+
using Reactant, SafeTestsets, Test
22

33
# parse some command-line arguments
44
function extract_flag!(args, flag, default=nothing; typ=typeof(default))
@@ -39,13 +39,20 @@ if do_gpu_list
3939
# TODO set which gpu
4040
end
4141

42-
include("layout.jl")
43-
include("tracing.jl")
44-
include("basic.jl")
45-
include("bcast.jl")
46-
include("struct.jl")
47-
include("closure.jl")
48-
include("compile.jl")
49-
include("buffer_donation.jl")
50-
include("nn.jl")
51-
include("nn_lux.jl")
42+
@testset "Reactant.jl Tests" begin
43+
@safetestset "Layout" include("layout.jl")
44+
@safetestset "Tracing" include("tracing.jl")
45+
@safetestset "Basic" include("basic.jl")
46+
@safetestset "Broadcast" include("bcast.jl")
47+
@safetestset "Struct" include("struct.jl")
48+
@safetestset "Closure" include("closure.jl")
49+
@safetestset "Compile" include("compile.jl")
50+
@safetestset "Buffer Donation" include("buffer_donation.jl")
51+
52+
@testset "Neural Networks" begin
53+
@safetestset "NNlib Primitives" include("nn/nnlib.jl")
54+
@safetestset "Flux.jl Integration" include("nn/flux.jl")
55+
@safetestset "LuxLib Primitives" include("nn/luxlib.jl")
56+
@safetestset "Lux Integration" include("nn/lux.jl")
57+
end
58+
end

0 commit comments

Comments
 (0)